Enhance Docker build workflow by adding path filters for specific APIs and workflow file
This commit is contained in:
@@ -5,11 +5,16 @@ on:
|
||||
branches:
|
||||
- main
|
||||
- develop
|
||||
paths:
|
||||
- 'auth_api/**'
|
||||
- 'employee_api/**'
|
||||
- 'transit_api/**'
|
||||
- 'admin_ui/**'
|
||||
- '.github/workflows/docker-build.yml'
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- develop
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
# GitHub Container Registry
|
||||
|
||||
@@ -21,6 +21,7 @@ export default function ScheduleMaker({ token, user }) {
|
||||
const [selectedLine, setSelectedLine] = useState('')
|
||||
const [selectedBus, setSelectedBus] = useState('')
|
||||
const [selectedDate, setSelectedDate] = useState(new Date().toISOString().split('T')[0])
|
||||
const [overviewDate, setOverviewDate] = useState(new Date().toISOString().split('T')[0])
|
||||
const [startTime, setStartTime] = useState('08:00')
|
||||
const [driverId, setDriverId] = useState('')
|
||||
const [selectedWeekdays, setSelectedWeekdays] = useState([])
|
||||
@@ -226,7 +227,15 @@ export default function ScheduleMaker({ token, user }) {
|
||||
const filteredSchedules = selectedDriverFilter
|
||||
? schedules.filter(s => String(s.driverId) === String(selectedDriverFilter))
|
||||
: schedules
|
||||
const schedulesBySlot = groupSchedulesByTimeSlot(filteredSchedules, timeSlots)
|
||||
const overviewSchedules = filteredSchedules.filter(schedule => {
|
||||
if (!overviewDate) return true
|
||||
const scheduleDate = new Date(schedule.startTime)
|
||||
const selectedOverview = new Date(`${overviewDate}T00:00:00`)
|
||||
return scheduleDate.getFullYear() === selectedOverview.getFullYear()
|
||||
&& scheduleDate.getMonth() === selectedOverview.getMonth()
|
||||
&& scheduleDate.getDate() === selectedOverview.getDate()
|
||||
})
|
||||
const schedulesBySlot = groupSchedulesByTimeSlot(overviewSchedules, timeSlots)
|
||||
|
||||
return (
|
||||
<section className="card">
|
||||
@@ -326,6 +335,16 @@ export default function ScheduleMaker({ token, user }) {
|
||||
)}
|
||||
|
||||
<h3 style={{ marginTop: '2rem' }}>Timetable</h3>
|
||||
<div className="form-row" style={{ marginBottom: '1rem' }}>
|
||||
<input
|
||||
type="date"
|
||||
value={overviewDate}
|
||||
onChange={e => setOverviewDate(e.target.value)}
|
||||
/>
|
||||
<button type="button" onClick={() => setOverviewDate(new Date().toISOString().split('T')[0])}>
|
||||
Vandaag
|
||||
</button>
|
||||
</div>
|
||||
<div className="timetable-container">
|
||||
<table className="timetable">
|
||||
<thead>
|
||||
|
||||
@@ -67,6 +67,7 @@ class AppTheme {
|
||||
brightness: Brightness.light,
|
||||
colorScheme: colorScheme,
|
||||
scaffoldBackgroundColor: const Color(0xFFF1F5F9),
|
||||
materialTapTargetSize: MaterialTapTargetSize.padded,
|
||||
textTheme: _textTheme(colorScheme),
|
||||
appBarTheme: AppBarTheme(
|
||||
backgroundColor: colorScheme.surface,
|
||||
@@ -138,6 +139,7 @@ class AppTheme {
|
||||
brightness: Brightness.dark,
|
||||
colorScheme: colorScheme,
|
||||
scaffoldBackgroundColor: const Color(0xFF0B1220),
|
||||
materialTapTargetSize: MaterialTapTargetSize.padded,
|
||||
textTheme: _textTheme(colorScheme).apply(bodyColor: Colors.white, displayColor: Colors.white),
|
||||
appBarTheme: AppBarTheme(
|
||||
backgroundColor: const Color(0xFF0B1220),
|
||||
|
||||
@@ -82,15 +82,18 @@ class _CustomInputFieldState extends State<CustomInputField> {
|
||||
borderSide: BorderSide(color: colorScheme.primary, width: 2),
|
||||
),
|
||||
suffixIcon: widget.obscureText
|
||||
? GestureDetector(
|
||||
onTap: () {
|
||||
? IconButton(
|
||||
tooltip: _obscureText ? 'Toon wachtwoord' : 'Verberg wachtwoord',
|
||||
onPressed: () {
|
||||
setState(() => _obscureText = !_obscureText);
|
||||
},
|
||||
child: Icon(
|
||||
icon: Icon(
|
||||
_obscureText ? Icons.visibility_off : Icons.visibility,
|
||||
size: 28, // Larger icon for accessibility
|
||||
color: colorScheme.primary,
|
||||
),
|
||||
splashRadius: 24,
|
||||
constraints: const BoxConstraints(minWidth: 48, minHeight: 48),
|
||||
)
|
||||
: null,
|
||||
),
|
||||
|
||||
@@ -53,15 +53,18 @@ class RouteCard extends StatelessWidget {
|
||||
final statusColor = _getStatusColor(route.status);
|
||||
final startTimeStr = _formatTime(route.startTime);
|
||||
|
||||
return GestureDetector(
|
||||
return Material(
|
||||
color: Colors.transparent,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
// Navigate to navigation screen
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
builder: (context) => NavigationScreen(route: route),
|
||||
),
|
||||
);
|
||||
},
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
splashFactory: InkSparkle.splashFactory,
|
||||
child: Card(
|
||||
margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
elevation: 0,
|
||||
@@ -78,8 +81,7 @@ class RouteCard extends StatelessWidget {
|
||||
children: [
|
||||
// Line number - Large and prominent
|
||||
Container(
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [colorScheme.primary, colorScheme.tertiary],
|
||||
@@ -99,8 +101,7 @@ class RouteCard extends StatelessWidget {
|
||||
),
|
||||
// Status badge
|
||||
Container(
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
|
||||
decoration: BoxDecoration(
|
||||
color: statusColor.withOpacity(0.14),
|
||||
border: Border.all(color: statusColor),
|
||||
@@ -132,8 +133,7 @@ class RouteCard extends StatelessWidget {
|
||||
),
|
||||
Text(
|
||||
route.busLine.startStop,
|
||||
style:
|
||||
Theme.of(context).textTheme.titleSmall?.copyWith(
|
||||
style: Theme.of(context).textTheme.titleSmall?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
@@ -154,8 +154,7 @@ class RouteCard extends StatelessWidget {
|
||||
),
|
||||
Text(
|
||||
route.busLine.endStop,
|
||||
style:
|
||||
Theme.of(context).textTheme.titleSmall?.copyWith(
|
||||
style: Theme.of(context).textTheme.titleSmall?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
@@ -180,8 +179,7 @@ class RouteCard extends StatelessWidget {
|
||||
),
|
||||
Text(
|
||||
'${route.busType.name} (${route.busType.seatCapacity} seats)',
|
||||
style:
|
||||
Theme.of(context).textTheme.titleSmall?.copyWith(
|
||||
style: Theme.of(context).textTheme.titleSmall?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
@@ -204,8 +202,7 @@ class RouteCard extends StatelessWidget {
|
||||
),
|
||||
Text(
|
||||
startTimeStr,
|
||||
style:
|
||||
Theme.of(context).textTheme.headlineSmall?.copyWith(
|
||||
style: Theme.of(context).textTheme.headlineSmall?.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: colorScheme.primary,
|
||||
),
|
||||
@@ -225,6 +222,7 @@ class RouteCard extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user