feat: add staff time card feature with localization and repository implementation
- Implemented Spanish translations for time card related strings. - Created TimeCardRepository to fetch time card data based on shifts. - Added use cases for retrieving time cards and payment history. - Developed BLoC for managing time card state and events. - Designed UI components for displaying time card summary and shift history. - Integrated time card navigation within the staff main module. - Updated pubspec.yaml files to include new dependencies and modules.
This commit is contained in:
@@ -704,6 +704,21 @@
|
||||
"immediate_start": "Immediate start",
|
||||
"no_experience": "No experience"
|
||||
}
|
||||
},
|
||||
"staff_time_card": {
|
||||
"title": "Timecard",
|
||||
"hours_worked": "Hours Worked",
|
||||
"total_earnings": "Total Earnings",
|
||||
"shift_history": "Shift History",
|
||||
"no_shifts": "No shifts for this month",
|
||||
"hours": "hours",
|
||||
"per_hr": "/hr",
|
||||
"status": {
|
||||
"approved": "Approved",
|
||||
"disputed": "Disputed",
|
||||
"paid": "Paid",
|
||||
"pending": "Pending"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -703,5 +703,20 @@
|
||||
"immediate_start": "Immediate start",
|
||||
"no_experience": "No experience"
|
||||
}
|
||||
},
|
||||
"staff_time_card": {
|
||||
"title": "Tarjeta de tiempo",
|
||||
"hours_worked": "Horas trabajadas",
|
||||
"total_earnings": "Ganancias totales",
|
||||
"shift_history": "Historial de turnos",
|
||||
"no_shifts": "No hay turnos para este mes",
|
||||
"hours": "horas",
|
||||
"per_hr": "/hr",
|
||||
"status": {
|
||||
"approved": "Aprobado",
|
||||
"disputed": "Disputado",
|
||||
"paid": "Pagado",
|
||||
"pending": "Pendiente"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
/// To regenerate, run: `dart run slang`
|
||||
///
|
||||
/// Locales: 2
|
||||
/// Strings: 1004 (502 per locale)
|
||||
/// Strings: 1026 (513 per locale)
|
||||
///
|
||||
/// Built on 2026-01-25 at 22:04 UTC
|
||||
/// Built on 2026-01-26 at 02:14 UTC
|
||||
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint, unused_import
|
||||
|
||||
@@ -56,6 +56,7 @@ class Translations with BaseTranslations<AppLocale, Translations> {
|
||||
late final TranslationsStaffCertificatesEn staff_certificates = TranslationsStaffCertificatesEn._(_root);
|
||||
late final TranslationsStaffProfileAttireEn staff_profile_attire = TranslationsStaffProfileAttireEn._(_root);
|
||||
late final TranslationsStaffShiftsEn staff_shifts = TranslationsStaffShiftsEn._(_root);
|
||||
late final TranslationsStaffTimeCardEn staff_time_card = TranslationsStaffTimeCardEn._(_root);
|
||||
}
|
||||
|
||||
// Path: common
|
||||
@@ -387,6 +388,38 @@ class TranslationsStaffShiftsEn {
|
||||
late final TranslationsStaffShiftsTagsEn tags = TranslationsStaffShiftsTagsEn._(_root);
|
||||
}
|
||||
|
||||
// Path: staff_time_card
|
||||
class TranslationsStaffTimeCardEn {
|
||||
TranslationsStaffTimeCardEn._(this._root);
|
||||
|
||||
final Translations _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
|
||||
/// en: 'Timecard'
|
||||
String get title => 'Timecard';
|
||||
|
||||
/// en: 'Hours Worked'
|
||||
String get hours_worked => 'Hours Worked';
|
||||
|
||||
/// en: 'Total Earnings'
|
||||
String get total_earnings => 'Total Earnings';
|
||||
|
||||
/// en: 'Shift History'
|
||||
String get shift_history => 'Shift History';
|
||||
|
||||
/// en: 'No shifts for this month'
|
||||
String get no_shifts => 'No shifts for this month';
|
||||
|
||||
/// en: 'hours'
|
||||
String get hours => 'hours';
|
||||
|
||||
/// en: '/hr'
|
||||
String get per_hr => '/hr';
|
||||
|
||||
late final TranslationsStaffTimeCardStatusEn status = TranslationsStaffTimeCardStatusEn._(_root);
|
||||
}
|
||||
|
||||
// Path: staff_authentication.get_started_page
|
||||
class TranslationsStaffAuthenticationGetStartedPageEn {
|
||||
TranslationsStaffAuthenticationGetStartedPageEn._(this._root);
|
||||
@@ -1691,6 +1724,27 @@ class TranslationsStaffShiftsTagsEn {
|
||||
String get no_experience => 'No experience';
|
||||
}
|
||||
|
||||
// Path: staff_time_card.status
|
||||
class TranslationsStaffTimeCardStatusEn {
|
||||
TranslationsStaffTimeCardStatusEn._(this._root);
|
||||
|
||||
final Translations _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
|
||||
/// en: 'Approved'
|
||||
String get approved => 'Approved';
|
||||
|
||||
/// en: 'Disputed'
|
||||
String get disputed => 'Disputed';
|
||||
|
||||
/// en: 'Paid'
|
||||
String get paid => 'Paid';
|
||||
|
||||
/// en: 'Pending'
|
||||
String get pending => 'Pending';
|
||||
}
|
||||
|
||||
// Path: staff_authentication.profile_setup_page.steps
|
||||
class TranslationsStaffAuthenticationProfileSetupPageStepsEn {
|
||||
TranslationsStaffAuthenticationProfileSetupPageStepsEn._(this._root);
|
||||
@@ -3113,6 +3167,19 @@ extension on Translations {
|
||||
'staff_shifts.details.pending_time' => ({required Object time}) => 'Pending ${time} ago',
|
||||
'staff_shifts.tags.immediate_start' => 'Immediate start',
|
||||
'staff_shifts.tags.no_experience' => 'No experience',
|
||||
'staff_time_card.title' => 'Timecard',
|
||||
'staff_time_card.hours_worked' => 'Hours Worked',
|
||||
'staff_time_card.total_earnings' => 'Total Earnings',
|
||||
'staff_time_card.shift_history' => 'Shift History',
|
||||
'staff_time_card.no_shifts' => 'No shifts for this month',
|
||||
'staff_time_card.hours' => 'hours',
|
||||
'staff_time_card.per_hr' => '/hr',
|
||||
'staff_time_card.status.approved' => 'Approved',
|
||||
'staff_time_card.status.disputed' => 'Disputed',
|
||||
'staff_time_card.status.paid' => 'Paid',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'staff_time_card.status.pending' => 'Pending',
|
||||
_ => null,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -53,6 +53,7 @@ class TranslationsEs with BaseTranslations<AppLocale, Translations> implements T
|
||||
@override late final _TranslationsStaffCertificatesEs staff_certificates = _TranslationsStaffCertificatesEs._(_root);
|
||||
@override late final _TranslationsStaffProfileAttireEs staff_profile_attire = _TranslationsStaffProfileAttireEs._(_root);
|
||||
@override late final _TranslationsStaffShiftsEs staff_shifts = _TranslationsStaffShiftsEs._(_root);
|
||||
@override late final _TranslationsStaffTimeCardEs staff_time_card = _TranslationsStaffTimeCardEs._(_root);
|
||||
}
|
||||
|
||||
// Path: common
|
||||
@@ -292,6 +293,23 @@ class _TranslationsStaffShiftsEs implements TranslationsStaffShiftsEn {
|
||||
@override late final _TranslationsStaffShiftsTagsEs tags = _TranslationsStaffShiftsTagsEs._(_root);
|
||||
}
|
||||
|
||||
// Path: staff_time_card
|
||||
class _TranslationsStaffTimeCardEs implements TranslationsStaffTimeCardEn {
|
||||
_TranslationsStaffTimeCardEs._(this._root);
|
||||
|
||||
final TranslationsEs _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
@override String get title => 'Tarjeta de tiempo';
|
||||
@override String get hours_worked => 'Horas trabajadas';
|
||||
@override String get total_earnings => 'Ganancias totales';
|
||||
@override String get shift_history => 'Historial de turnos';
|
||||
@override String get no_shifts => 'No hay turnos para este mes';
|
||||
@override String get hours => 'horas';
|
||||
@override String get per_hr => '/hr';
|
||||
@override late final _TranslationsStaffTimeCardStatusEs status = _TranslationsStaffTimeCardStatusEs._(_root);
|
||||
}
|
||||
|
||||
// Path: staff_authentication.get_started_page
|
||||
class _TranslationsStaffAuthenticationGetStartedPageEs implements TranslationsStaffAuthenticationGetStartedPageEn {
|
||||
_TranslationsStaffAuthenticationGetStartedPageEs._(this._root);
|
||||
@@ -1049,6 +1067,19 @@ class _TranslationsStaffShiftsTagsEs implements TranslationsStaffShiftsTagsEn {
|
||||
@override String get no_experience => 'No experience';
|
||||
}
|
||||
|
||||
// Path: staff_time_card.status
|
||||
class _TranslationsStaffTimeCardStatusEs implements TranslationsStaffTimeCardStatusEn {
|
||||
_TranslationsStaffTimeCardStatusEs._(this._root);
|
||||
|
||||
final TranslationsEs _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
@override String get approved => 'Aprobado';
|
||||
@override String get disputed => 'Disputado';
|
||||
@override String get paid => 'Pagado';
|
||||
@override String get pending => 'Pendiente';
|
||||
}
|
||||
|
||||
// Path: staff_authentication.profile_setup_page.steps
|
||||
class _TranslationsStaffAuthenticationProfileSetupPageStepsEs implements TranslationsStaffAuthenticationProfileSetupPageStepsEn {
|
||||
_TranslationsStaffAuthenticationProfileSetupPageStepsEs._(this._root);
|
||||
@@ -2091,6 +2122,19 @@ extension on TranslationsEs {
|
||||
'staff_shifts.details.pending_time' => ({required Object time}) => 'Pending ${time} ago',
|
||||
'staff_shifts.tags.immediate_start' => 'Immediate start',
|
||||
'staff_shifts.tags.no_experience' => 'No experience',
|
||||
'staff_time_card.title' => 'Tarjeta de tiempo',
|
||||
'staff_time_card.hours_worked' => 'Horas trabajadas',
|
||||
'staff_time_card.total_earnings' => 'Ganancias totales',
|
||||
'staff_time_card.shift_history' => 'Historial de turnos',
|
||||
'staff_time_card.no_shifts' => 'No hay turnos para este mes',
|
||||
'staff_time_card.hours' => 'horas',
|
||||
'staff_time_card.per_hr' => '/hr',
|
||||
'staff_time_card.status.approved' => 'Aprobado',
|
||||
'staff_time_card.status.disputed' => 'Disputado',
|
||||
'staff_time_card.status.paid' => 'Pagado',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'staff_time_card.status.pending' => 'Pendiente',
|
||||
_ => null,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user