Move apps to mobile directory structure

Relocated all app directories (client, design_system_viewer, staff) and their contents under the new 'apps/mobile' path. This change improves project organization and prepares for future platform-specific structuring.
This commit is contained in:
Achintha Isuru
2026-01-22 10:17:19 -05:00
parent 2f992ae5fa
commit cf59935ec8
982 changed files with 3 additions and 2532 deletions

View File

@@ -0,0 +1,58 @@
import 'package:equatable/equatable.dart';
/// The status of a staff [Assignment].
enum AssignmentStatus {
/// Staff member has been assigned but hasn't confirmed.
assigned,
/// Staff member has accepted the assignment.
confirmed,
/// Work is currently in progress (Clocked In).
ongoing,
/// Work completed successfully (Clocked Out).
completed,
/// Staff rejected the assignment offer.
declinedByStaff,
/// Staff canceled after accepting.
canceledByStaff,
/// Staff did not show up.
noShowed,
}
/// Represents the link between a [Staff] member and an [EventShiftPosition].
class Assignment extends Equatable {
/// Unique identifier.
final String id;
/// The job position being filled.
final String positionId;
/// The staff member filling the position.
final String staffId;
/// Current status of the assignment.
final AssignmentStatus status;
/// Actual timestamp when staff clocked in.
final DateTime? clockIn;
/// Actual timestamp when staff clocked out.
final DateTime? clockOut;
const Assignment({
required this.id,
required this.positionId,
required this.staffId,
required this.status,
this.clockIn,
this.clockOut,
});
@override
List<Object?> get props => [id, positionId, staffId, status, clockIn, clockOut];
}

View File

@@ -0,0 +1,70 @@
import 'package:equatable/equatable.dart';
/// The workflow status of an [Event].
enum EventStatus {
/// Created but incomplete.
draft,
/// Waiting for approval or publication.
pending,
/// Published and staff have been assigned.
assigned,
/// Fully confirmed and ready to start.
confirmed,
/// Currently in progress.
active,
/// Work has finished.
finished,
/// All post-event processes (invoicing) complete.
completed,
/// Archived.
closed,
/// Flagged for administrative review.
underReview,
}
/// Represents a Job Posting or Event.
///
/// This is the central entity for scheduling work. An Event contains [EventShift]s.
class Event extends Equatable {
/// Unique identifier.
final String id;
/// The [Business] hosting the event.
final String businessId;
/// The [Hub] location.
final String hubId;
/// Title of the event.
final String name;
/// Date of the event.
final DateTime date;
/// Current workflow status.
final EventStatus status;
/// Type of employment contract (e.g., 'freelance', 'permanent').
final String contractType;
const Event({
required this.id,
required this.businessId,
required this.hubId,
required this.name,
required this.date,
required this.status,
required this.contractType,
});
@override
List<Object?> get props => [id, businessId, hubId, name, date, status, contractType];
}

View File

@@ -0,0 +1,28 @@
import 'package:equatable/equatable.dart';
/// Represents a specific time block or "shift" within an [Event].
///
/// An Event can have multiple shifts (e.g. "Morning Shift", "Evening Shift").
class EventShift extends Equatable {
/// Unique identifier.
final String id;
/// The [Event] this shift belongs to.
final String eventId;
/// Descriptive name (e.g. "Setup Crew").
final String name;
/// Specific address for this shift (if different from Hub).
final String address;
const EventShift({
required this.id,
required this.eventId,
required this.name,
required this.address,
});
@override
List<Object?> get props => [id, eventId, name, address];
}

View File

@@ -0,0 +1,53 @@
import 'package:equatable/equatable.dart';
/// Represents a specific job opening within a [EventShift].
///
/// Defines the requirement for a specific [Skill], the quantity needed, and the pay.
class EventShiftPosition extends Equatable {
/// Unique identifier.
final String id;
/// The [EventShift] this position is part of.
final String shiftId;
/// The [Skill] required for this position.
final String skillId;
/// Number of staff needed.
final int count;
/// Hourly pay rate.
final double rate;
/// Start time of this specific position.
final DateTime startTime;
/// End time of this specific position.
final DateTime endTime;
/// Deducted break duration in minutes.
final int breakDurationMinutes;
const EventShiftPosition({
required this.id,
required this.shiftId,
required this.skillId,
required this.count,
required this.rate,
required this.startTime,
required this.endTime,
required this.breakDurationMinutes,
});
@override
List<Object?> get props => [
id,
shiftId,
skillId,
count,
rate,
startTime,
endTime,
breakDurationMinutes,
];
}

View File

@@ -0,0 +1,32 @@
import 'package:equatable/equatable.dart';
/// Represents a verified record of time worked.
///
/// Derived from [Assignment] clock-in/out times, used for payroll.
class WorkSession extends Equatable {
/// Unique identifier.
final String id;
/// The [Assignment] this session belongs to.
final String assignmentId;
/// Verified start time.
final DateTime startTime;
/// Verified end time.
final DateTime? endTime;
/// Verified break duration.
final int breakDurationMinutes;
const WorkSession({
required this.id,
required this.assignmentId,
required this.startTime,
this.endTime,
required this.breakDurationMinutes,
});
@override
List<Object?> get props => [id, assignmentId, startTime, endTime, breakDurationMinutes];
}