lots of fixes

This commit is contained in:
2024-04-07 19:51:58 -05:00
parent 7b0ac130f8
commit 2728d612d4
15 changed files with 55 additions and 203 deletions
-1
View File
@@ -99,7 +99,6 @@ Future editBusiness(Business business, String jwt) async {
"locationAddress": "${business.locationAddress}"
}
''';
print(json);
try {
var response = await http.post(Uri.parse('$apiAddress/editbusiness'),
body: json,
+1 -1
View File
@@ -80,7 +80,7 @@ class _HomeState extends State<Home> {
scrolledUnderElevation: 0,
centerTitle: true,
expandedHeight: widescreen ? 70 : 120,
backgroundColor: Theme.of(context).colorScheme.background,
backgroundColor: Theme.of(context).colorScheme.surface,
bottom: _getBottom(),
leading: IconButton(
icon: getIconFromThemeMode(themeMode),
+1 -1
View File
@@ -89,7 +89,7 @@ class _MainAppState extends State<MainApp> {
primary: Colors.blue,
onPrimary: Colors.white,
secondary: Colors.blue.shade200,
background: Colors.white,
background: Colors.grey.shade300,
tertiary: Colors.green,
),
iconTheme: const IconThemeData(color: Colors.black),
+1 -1
View File
@@ -42,7 +42,7 @@ class _CreateBusinessDetailState extends State<BusinessDetail> {
leading: ClipRRect(
borderRadius: BorderRadius.circular(6.0),
child: Image.network(
'https://$apiAddress/fbla-api/logos/${business.id}',
'$apiAddress/logos/${business.id}',
width: 48,
height: 48, errorBuilder: (BuildContext context,
Object exception, StackTrace? stackTrace) {
+20 -13
View File
@@ -180,7 +180,7 @@ class _CreateEditBusinessState extends State<CreateEditBusiness> {
FocusScope.of(context).unfocus();
},
decoration: const InputDecoration(
labelText: 'Business Name',
labelText: 'Business Name (required)',
),
validator: (value) {
if (value != null && value.isEmpty) {
@@ -199,17 +199,19 @@ class _CreateEditBusinessState extends State<CreateEditBusiness> {
AutovalidateMode.onUserInteraction,
keyboardType: TextInputType.url,
onChanged: (inputUrl) {
business.website = Uri.encodeFull(inputUrl
.toLowerCase()
.replaceAll('https://', '')
.replaceAll('http://', '')
.replaceAll('www.', ''));
setState(() {
business.website = Uri.encodeFull(inputUrl
.toLowerCase()
.replaceAll('https://', '')
.replaceAll('http://', '')
.replaceAll('www.', ''));
});
},
onTapOutside: (PointerDownEvent event) {
FocusScope.of(context).unfocus();
},
decoration: const InputDecoration(
labelText: 'Website',
labelText: 'Website (required)',
),
validator: (value) {
if (value != null && value.isEmpty) {
@@ -227,6 +229,7 @@ class _CreateEditBusinessState extends State<CreateEditBusiness> {
autovalidateMode:
AutovalidateMode.onUserInteraction,
maxLength: 500,
maxLines: null,
onChanged: (inputDesc) {
setState(() {
business.description = inputDesc;
@@ -236,7 +239,7 @@ class _CreateEditBusinessState extends State<CreateEditBusiness> {
FocusScope.of(context).unfocus();
},
decoration: const InputDecoration(
labelText: 'Business Description',
labelText: 'Business Description (required)',
),
validator: (value) {
if (value != null && value.isEmpty) {
@@ -332,7 +335,7 @@ class _CreateEditBusinessState extends State<CreateEditBusiness> {
FocusScope.of(context).unfocus();
},
decoration: const InputDecoration(
labelText: 'Location Name (optional)',
labelText: 'Location Name',
),
),
),
@@ -350,7 +353,7 @@ class _CreateEditBusinessState extends State<CreateEditBusiness> {
FocusScope.of(context).unfocus();
},
decoration: const InputDecoration(
labelText: 'Location Address (optional)',
labelText: 'Location Address',
),
),
),
@@ -380,6 +383,9 @@ class _CreateEditBusinessState extends State<CreateEditBusiness> {
DropdownMenuEntry(
value: BusinessType.manufacturing,
label: 'Manufacturing'),
DropdownMenuEntry(
value: BusinessType.entertainment,
label: 'Entertainment'),
DropdownMenuEntry(
value: BusinessType.other,
label: 'Other'),
@@ -404,7 +410,7 @@ class _CreateEditBusinessState extends State<CreateEditBusiness> {
},
decoration: const InputDecoration(
labelText:
'Contact Information Name (optional)',
'Contact Information Name',
),
),
),
@@ -439,7 +445,7 @@ class _CreateEditBusinessState extends State<CreateEditBusiness> {
FocusScope.of(context).unfocus();
},
decoration: const InputDecoration(
labelText: 'Contact Email (optional)',
labelText: 'Contact Email',
),
validator: (value) {
if (value != null) {
@@ -463,6 +469,7 @@ class _CreateEditBusinessState extends State<CreateEditBusiness> {
child: TextFormField(
controller: _notesController,
maxLength: 300,
maxLines: null,
onSaved: (inputText) {
business.notes = inputText!;
},
@@ -470,7 +477,7 @@ class _CreateEditBusinessState extends State<CreateEditBusiness> {
FocusScope.of(context).unfocus();
},
decoration: const InputDecoration(
labelText: 'Other Notes (optional)',
labelText: 'Other Notes',
),
),
),
+18 -5
View File
@@ -67,6 +67,7 @@ enum BusinessType {
shop,
outdoors,
manufacturing,
entertainment,
other,
}
@@ -171,6 +172,12 @@ Icon getIconFromType(BusinessType type, double size, Color color) {
size: size,
color: color,
);
case BusinessType.entertainment:
return Icon(
Icons.live_tv,
size: size,
color: color,
);
case BusinessType.other:
return Icon(
Icons.business,
@@ -190,6 +197,8 @@ pw.Icon getPwIconFromType(BusinessType type, double size, PdfColor color) {
return pw.Icon(const pw.IconData(0xea99), size: size, color: color);
case BusinessType.manufacturing:
return pw.Icon(const pw.IconData(0xebbc), size: size, color: color);
case BusinessType.entertainment:
return pw.Icon(const pw.IconData(0xe639), size: size, color: color);
case BusinessType.other:
return pw.Icon(const pw.IconData(0xe0af), size: size, color: color);
}
@@ -205,6 +214,8 @@ Text getNameFromType(BusinessType type, Color color) {
return Text('Outdoors', style: TextStyle(color: color));
case BusinessType.manufacturing:
return Text('Manufacturing', style: TextStyle(color: color));
case BusinessType.entertainment:
return Text('Entertainment', style: TextStyle(color: color));
case BusinessType.other:
return Text('Other', style: TextStyle(color: color));
}
@@ -498,10 +509,12 @@ class _BusinessCardState extends State<BusinessCard> {
backgroundColor: Theme.of(context)
.colorScheme
.background,
title: Text(
'Contact ${business.contactName}?'),
content: Text(
'Would you like to call or text ${business.contactName}?'),
title: Text(business.contactName.isEmpty
? 'Contact ${business.name}?'
: 'Contact ${business.contactName}'),
content: Text(business.contactName.isEmpty
? 'Would you like to call or text ${business.name}?'
: 'Would you like to call or text ${business.contactName}?'),
actions: [
TextButton(
child: const Text('Text'),
@@ -675,7 +688,7 @@ class _FilterChipsState extends State<FilterChips> {
showCheckmark: false,
shape:
RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
label: Text(type.name),
label: getNameFromType(type, Theme.of(context).colorScheme.onSurface),
selected: selectedChips.contains(type),
onSelected: (bool selected) {
setState(() {
+9
View File
@@ -101,3 +101,12 @@ flutter:
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages
msix_config:
display_name: Job Link
publisher_display_name: MarinoDev
identity_name: com.marinodev.joblink
msix_version: 0.1.0.0
logo_path: C:\Users\Drake Marino\Code\FBLA24\fbla24\fbla_ui\windows\windows_logo.png
capabilities: internetClient
install_certificate: true
+1 -1
View File
@@ -27,7 +27,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
FlutterWindow window(project);
Win32Window::Point origin(10, 10);
Win32Window::Size size(1280, 720);
if (!window.Create(L"fbla_ui", origin, size)) {
if (!window.Create(L"Job Link", origin, size)) {
return EXIT_FAILURE;
}
window.SetQuitOnClose(true);
Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 166 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB