more fixes

This commit is contained in:
Drake Marino 2024-06-27 21:50:36 -05:00
parent 921ce17736
commit db8f44234a
5 changed files with 12 additions and 19 deletions

View File

@ -181,7 +181,7 @@ class _CreateBusinessDetailState extends State<BusinessDetail> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(left: 16, top: 4),
padding: const EdgeInsets.only(left: 16, top: 8),
child: _GetListingsTitle(business)),
if (business.listings != null)
_JobList(business: business)
@ -340,6 +340,7 @@ class _JobListItem extends StatelessWidget {
subtitle: Text(
jobListing.description,
style: const TextStyle(overflow: TextOverflow.ellipsis),
maxLines: 2,
),
trailing: _getEditIcon(context, fromBusiness, jobListing),
onTap: () {

View File

@ -32,7 +32,7 @@ class _CreateEditJobListingState extends State<CreateEditJobListing> {
id: null,
businessId: null,
name: 'Job Listing',
description: 'Add details about the business below.',
description: 'Add details about the job below.',
type: null,
wage: null,
link: null,

View File

@ -32,6 +32,7 @@ class _CreateBusinessDetailState extends State<JobListingDetail> {
);
}
/// body of the JobListingDetail
Widget _detailBody(JobListing listing) {
return ListView(
children: [
@ -63,6 +64,7 @@ class _CreateBusinessDetailState extends State<JobListingDetail> {
);
}
/// Top card including title, logo, description, and business name
Widget _summaryCard(JobListing listing) {
return Card(
clipBehavior: Clip.antiAlias,
@ -147,6 +149,7 @@ class _CreateBusinessDetailState extends State<JobListingDetail> {
);
}
/// Edit / delete actions if the user is logged in
List<Widget>? _getActions(JobListing listing, Business fromBusiness) {
if (loggedIn) {
return [

View File

@ -7,7 +7,7 @@ import 'package:fbla_ui/shared/utils.dart';
import 'package:http/http.dart' as http;
var apiAddress = 'https://homelab.marinodev.com/fbla-api';
// var apiAddress = 'http://192.168.0.114:8000/fbla-api';
// var apiAddress = 'http://192.168.0.114:8000/fbla-api'; // TODO
var client = http.Client();
@ -58,8 +58,11 @@ Future fetchBusinessDataOverviewJobs(
if (typeFilters != null && typeFilters.isNotEmpty) {
uriString +=
'?typeFilters=${typeFilters.map((jobType) => jobType.name).join(',')}';
}
if (offerFilters != null && offerFilters.isNotEmpty) {
uriString +=
'&offerFilters=${offerFilters.map((offerType) => offerType.name).join(',')}';
}
} else if (offerFilters != null && offerFilters.isNotEmpty) {
uriString +=
'?offerFilters=${offerFilters.map((offerType) => offerType.name).join(',')}';
}

View File

@ -36,8 +36,6 @@ enum JobType {
retail,
customerService,
foodService,
finance, // unused
healthcare, // unused
education,
maintenance,
manufacturing,
@ -185,10 +183,6 @@ IconData getIconFromJobType(JobType type) {
return Icons.support_agent;
case JobType.foodService:
return Icons.restaurant;
case JobType.finance:
return Icons.paid;
case JobType.healthcare:
return Icons.medical_services;
case JobType.education:
return Icons.school;
case JobType.maintenance:
@ -225,10 +219,6 @@ pw.IconData getPwIconFromJobType(JobType type) {
return const pw.IconData(0xf0e2);
case JobType.foodService:
return const pw.IconData(0xe56c);
case JobType.finance:
return const pw.IconData(0xf041);
case JobType.healthcare:
return const pw.IconData(0xf109);
case JobType.education:
return const pw.IconData(0xe80c);
case JobType.maintenance:
@ -265,10 +255,6 @@ String getNameFromJobType(JobType type) {
return 'Customer Service';
case JobType.foodService:
return 'Food Service';
case JobType.finance:
return 'Finance';
case JobType.healthcare:
return 'Healthcare';
case JobType.education:
return 'Education';
case JobType.maintenance: