more fixes
This commit is contained in:
parent
1f7b850d66
commit
1a6bf08bde
@ -225,7 +225,10 @@ class _CreateEditBusinessState extends State<CreateEditBusiness> {
|
||||
controller: _websiteController,
|
||||
keyboardType: TextInputType.url,
|
||||
onChanged: (inputUrl) {
|
||||
business.website = Uri.encodeFull(inputUrl);
|
||||
setState(() {
|
||||
business.website =
|
||||
Uri.encodeFull(inputUrl);
|
||||
});
|
||||
if (inputUrl.trim().isEmpty) {
|
||||
business.website = null;
|
||||
} else {
|
||||
@ -233,8 +236,10 @@ class _CreateEditBusinessState extends State<CreateEditBusiness> {
|
||||
.contains('http://') &&
|
||||
!business.website!
|
||||
.contains('https://')) {
|
||||
setState(() {
|
||||
business.website =
|
||||
'https://${business.website!.trim()}';
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -60,6 +60,9 @@ class _CreateEditJobListingState extends State<CreateEditJobListing> {
|
||||
.replaceAll('www.', ''));
|
||||
getBusinessNameMapping = fetchBusinessNames();
|
||||
businessName = widget.inputBusiness?.name ?? 'Offering business';
|
||||
if (widget.inputBusiness != null) {
|
||||
listing.businessId = widget.inputBusiness!.id;
|
||||
}
|
||||
}
|
||||
|
||||
final formKey = GlobalKey<FormState>();
|
||||
@ -67,9 +70,6 @@ class _CreateEditJobListingState extends State<CreateEditJobListing> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
widescreen = MediaQuery.sizeOf(context).width >= widescreenWidth;
|
||||
if (widget.inputBusiness != null) {
|
||||
listing.businessId = widget.inputBusiness!.id;
|
||||
}
|
||||
return PopScope(
|
||||
canPop: !_isLoading,
|
||||
onPopInvoked: _handlePop,
|
||||
|
||||
@ -8,7 +8,7 @@ import 'package:fbla_ui/shared/widgets.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
/// A page to view all specific details about a single job listing (with it's businesses contact info)
|
||||
/// A page to view all specific details about a single job listing (with its businesses contact info)
|
||||
class JobListingDetail extends StatefulWidget {
|
||||
final JobListing listing;
|
||||
final Business fromBusiness;
|
||||
|
||||
@ -36,8 +36,8 @@ enum JobType {
|
||||
retail,
|
||||
customerService,
|
||||
foodService,
|
||||
finance,
|
||||
healthcare,
|
||||
finance, // unused
|
||||
healthcare, // unused
|
||||
education,
|
||||
maintenance,
|
||||
manufacturing,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user