feat: Refactor code structure and optimize performance across multiple modules

This commit is contained in:
Achintha Isuru
2025-11-17 23:29:28 -05:00
parent 831570f2e0
commit a64cbd9edf
1508 changed files with 105319 additions and 0 deletions

View File

@@ -0,0 +1,79 @@
const String _staffPaymentFields = '''
id
rate
assignment {
clock_in
clock_out
start_at
end_at
break_in
break_out
position {
shift {
event {
name
date
business {
id
name
avatar
}
}
}
business_skill {
skill {
name
}
}
}
}
work_hours
amount
status
paid_at
created_at
updated_at
''';
const String getWorkSummaryQuerySchema = '''
query GetWorkSummary {
staff_work_summary {
weekly_hours
monthly_hours
weekly_earnings
monthly_earnings
}
}
''';
const String getPaymentsQuerySchema = '''
query GetStaffPayments (\$status: StaffPaymentStatusInput!, \$first: Int!, \$after: String) {
staff_payments(status: \$status, first: \$first, after: \$after) {
pageInfo {
hasNextPage
}
edges {
node {
$_staffPaymentFields
}
cursor
}
}
}
''';
const String confirmPaymentMutationSchema = '''
mutation ConfirmStaffPayment (\$id: ID!) {
confirm_staff_payment(id: \$id) {
$_staffPaymentFields
}
}
''';
const String declinePaymentMutationSchema = '''
mutation DeclineStaffPayment (\$id: ID!, \$reason: String!, \$details: String) {
decline_staff_payment(id: \$id, reason: \$reason, details: \$details) {
$_staffPaymentFields
}
}
''';