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

View File

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

View File

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

View File

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

View File

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