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:
@@ -0,0 +1,70 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
/// The workflow status of an [Invoice].
|
||||
enum InvoiceStatus {
|
||||
/// Generated but not yet sent/finalized.
|
||||
open,
|
||||
|
||||
/// Client has disputed a line item.
|
||||
disputed,
|
||||
|
||||
/// Dispute has been handled.
|
||||
resolved,
|
||||
|
||||
/// Invoice accepted by client.
|
||||
verified,
|
||||
|
||||
/// Payment received.
|
||||
paid,
|
||||
|
||||
/// Payment reconciled in accounting.
|
||||
reconciled,
|
||||
|
||||
/// Payment not received by due date.
|
||||
overdue,
|
||||
}
|
||||
|
||||
/// Represents a bill sent to a [Business] for services rendered.
|
||||
class Invoice extends Equatable {
|
||||
/// Unique identifier.
|
||||
final String id;
|
||||
|
||||
/// The [Event] this invoice covers.
|
||||
final String eventId;
|
||||
|
||||
/// The [Business] being billed.
|
||||
final String businessId;
|
||||
|
||||
/// Current payment/approval status.
|
||||
final InvoiceStatus status;
|
||||
|
||||
/// Grand total amount.
|
||||
final double totalAmount;
|
||||
|
||||
/// Total amount for labor costs.
|
||||
final double workAmount;
|
||||
|
||||
/// Total amount for addons/extras.
|
||||
final double addonsAmount;
|
||||
|
||||
const Invoice({
|
||||
required this.id,
|
||||
required this.eventId,
|
||||
required this.businessId,
|
||||
required this.status,
|
||||
required this.totalAmount,
|
||||
required this.workAmount,
|
||||
required this.addonsAmount,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
id,
|
||||
eventId,
|
||||
businessId,
|
||||
status,
|
||||
totalAmount,
|
||||
workAmount,
|
||||
addonsAmount,
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
/// Represents a reason or log for a declined [Invoice].
|
||||
class InvoiceDecline extends Equatable {
|
||||
/// Unique identifier.
|
||||
final String id;
|
||||
|
||||
/// The [Invoice] that was declined.
|
||||
final String invoiceId;
|
||||
|
||||
/// Reason provided by the client.
|
||||
final String reason;
|
||||
|
||||
/// When the decline happened.
|
||||
final DateTime declinedAt;
|
||||
|
||||
const InvoiceDecline({
|
||||
required this.id,
|
||||
required this.invoiceId,
|
||||
required this.reason,
|
||||
required this.declinedAt,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [id, invoiceId, reason, declinedAt];
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
/// Represents a line item in an [Invoice].
|
||||
///
|
||||
/// Corresponds to the work done by one [Staff] member.
|
||||
class InvoiceItem extends Equatable {
|
||||
/// Unique identifier.
|
||||
final String id;
|
||||
|
||||
/// The [Invoice] this item belongs to.
|
||||
final String invoiceId;
|
||||
|
||||
/// The [Staff] member whose work is being billed.
|
||||
final String staffId;
|
||||
|
||||
/// Total billed hours.
|
||||
final double workHours;
|
||||
|
||||
/// Hourly rate applied.
|
||||
final double rate;
|
||||
|
||||
/// Total line item amount (workHours * rate).
|
||||
final double amount;
|
||||
|
||||
const InvoiceItem({
|
||||
required this.id,
|
||||
required this.invoiceId,
|
||||
required this.staffId,
|
||||
required this.workHours,
|
||||
required this.rate,
|
||||
required this.amount,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [id, invoiceId, staffId, workHours, rate, amount];
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
/// Status of a staff payout.
|
||||
enum PaymentStatus {
|
||||
/// Payout calculated but not processed.
|
||||
pending,
|
||||
|
||||
/// Submitted to banking provider.
|
||||
processing,
|
||||
|
||||
/// Successfully transferred to staff.
|
||||
paid,
|
||||
|
||||
/// Transfer failed.
|
||||
failed,
|
||||
}
|
||||
|
||||
/// Represents a payout to a [Staff] member for a completed [Assignment].
|
||||
class StaffPayment extends Equatable {
|
||||
/// Unique identifier.
|
||||
final String id;
|
||||
|
||||
/// The recipient [Staff].
|
||||
final String staffId;
|
||||
|
||||
/// The [Assignment] being paid for.
|
||||
final String assignmentId;
|
||||
|
||||
/// Amount to be paid.
|
||||
final double amount;
|
||||
|
||||
/// Processing status.
|
||||
final PaymentStatus status;
|
||||
|
||||
/// When the payment was successfully processed.
|
||||
final DateTime? paidAt;
|
||||
|
||||
const StaffPayment({
|
||||
required this.id,
|
||||
required this.staffId,
|
||||
required this.assignmentId,
|
||||
required this.amount,
|
||||
required this.status,
|
||||
this.paidAt,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [id, staffId, assignmentId, amount, status, paidAt];
|
||||
}
|
||||
Reference in New Issue
Block a user