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>WY58&EF$ILyHZZ9JAz6;Yh2qY-s zzQtcgY=O__WI0npAvBUM;qX4mIvMsm)5OhE=W`|B^r|UHpEpQ`#|K|YvRdtxJjh-1 zrus>63?e9H9as>xsP8F-R>J!k3%V*3{rR;%JUvZC4h5w3;EvG#$54RBJ(pLa4)!i) z_AUl$o{nbDdXKYzOk?aZ7TquKgJ{a37?fOQNyJB^=L2@rU!a2fi*c+l`*u!`cbi!d zKJ|Pl`% (ei#7a?95Rbn?~6FOpvBBeP @YV{#21Lj zp>O6Ki=JKKT(9KB6t+l;dpW{XjE?xVB-ozGi1VW$?W?z{A;tIjJ?NK=V`?2JZ;M7t zPQ;g|6zr9I8nh?`pRZt-lYgd~&j{CVM&@LzZ28gM(KJhA?8P(^iQOoxN#zi+%>Rn4 z7FNKFMv_ti%dE3_e&9JA%N4;WQrx@J*DR4ZJ aFwN$eHTueI)^};bV_8~D2^$^n;2k5V~ zb{}e|6N{^>5{7EsBe=+YgH8 $S8r{i$*+C zv2D^eM6-ib84=8L*Qpv1V+}nDDvR&c#BDxSQt-Rmd# FVdQ#vWrSPHPAvA!0 zd}1LWu>pU*W%T=NGLLKezo&nC=jcy_-(Lp#JAyX2%|8&H&cXgf`2D?yzaun(4d@>T zPdl4`BK#ii|M-5yUkMpJOTh^L__oCVK8hyT{rv}&f9%cwEK4Ey4DlaO{;@~DhbH~K zN5^naD1S!YJneJ-*`wcMc^<=<{z|?Wf1> KJ{_oKtV zi&cdGC(3VP{dI`?C*bcp=6@Hf6>RIkod3zzKXU&27W3c5!Y2I_CS@n0n z@6k{FE6u-ns`|frt$#xN?v6Y MV6<^zsBHqh<_Y~ y->ulAS^g{4v;NIU|0w{+Z+i3Z! S_client_sign_in_Q["Queries
* user - getUserById
* business - getBusinessesByUserId"] - S_client_sign_in --> S_client_sign_in_F["Firebase
* user - auth"] -end - -subgraph C2["Create account"] - S_client_sign_up["client_sign_up_screen.dart"] - S_client_sign_up --> S_client_sign_up_Q["Queries
* business - getBusinessesByUserId"] - S_client_sign_up --> S_client_sign_up_M["Mutations
* user - createUser
* business - createBusiness"] -end - -subgraph C3["Edit account"] - S_edit_account_na["manual_or_unknown_screen.dart"] - S_edit_account_na --> S_edit_account_na_M["Mutations
* business - updateBusiness"] -end - -subgraph C4["Profile"] - S_client_settings["client_settings_screen.dart"] - S_client_settings --> S_client_settings_Q["Queries
* user - getUserById
* business - getBusinessesByUserId"] -end - -subgraph C5["Hubs"] - S_client_hubs["client_hubs_screen.dart"] - S_client_hubs --> S_client_hubs_Q["Queries
* hub - getHubsByOwnerId"] - S_client_hubs --> S_client_hubs_M["Mutations
* hub - createHub
* hub - updateHub
* hub - deleteHub"] -end - -subgraph C6["Orders"] - S_client_shifts["client_shifts_screen.dart"] - S_client_shifts --> S_client_shifts_Q["Queries
* order - getOrdersByOwnerId"] -end - -subgraph C7["RAPID Order"] - S_rapid_order["rapid_order_flow_page.dart"] - S_rapid_order --> S_rapid_order_M["Mutations
* order - createOrder"] -end - -subgraph C8["One-time Order"] - S_one_time["one_time_order_flow_page.dart"] - S_one_time --> S_one_time_Q["Queries
* role - listRolesByOwnerId"] - S_one_time --> S_one_time_M["Mutations
* position - createPosition
* order - createOrder"] -end - -subgraph C9["Permanent Placement"] - S_permanent["permanent_order_flow_page.dart"] - S_permanent --> S_permanent_Q["Queries
* role - listRolesByOwnerId"] - S_permanent --> S_permanent_M["Mutations
* position - createPosition
* order - createOrder"] -end - -subgraph C10["Recurring Order"] - S_recurring["recurring_order_flow_page.dart"] - S_recurring --> S_recurring_Q["Queries
* role - listRolesByOwnerId"] - S_recurring --> S_recurring_M["Mutations
* position - createPosition
* order - createOrder"] -end - -subgraph C11["Billing"] - S_billing["client_billing_screen.dart"] - S_billing --> S_billing_Q["Queries
* account - getAccountsByOwnerId
* invoice - getInvoicesByOwnerId
* recentPayment - filterRecentPayments"] - S_billing --> S_billing_M["Mutations
* account - createAccount
* account - updateAccount
* account - deleteAccount"] -end - -subgraph C12["Coverage"] - S_coverage["coverage_dashboard.dart"] - S_coverage --> S_coverage_Q["Queries
* order - getOrdersByOwnerId
* shift - filterShifts
* application - getApplicationsByShiftId"] -end - -subgraph C13["Home"] - S_client_home["client_home_screen.dart"] - S_client_home --> S_client_home_Q["Queries
* order - getOrdersByOwnerId
* shift - filterShifts
* application - getApplicationsByShiftId
* recentPayment - filterRecentPayments"] - S_client_home --> S_client_home_M["Mutations
* order - createOrder"] -end diff --git a/docs/backend-diagram/dataconnect-schema.mmd b/docs/backend-diagram/dataconnect-schema.mmd deleted file mode 100644 index b67267f0..00000000 --- a/docs/backend-diagram/dataconnect-schema.mmd +++ /dev/null @@ -1,271 +0,0 @@ -erDiagram - User { - String id PK - String email - String fullName - Timestamp createdDate - } - Business { - UUID id PK - String userId FK - String businessName - Timestamp createdAt - } - Vendor { - UUID id PK - String userId FK - String companyName - Timestamp createdAt - } - Staff { - UUID id PK - String userId FK - UUID hubId FK - UUID ownerId FK - String fullName - Timestamp createdAt - } - Shift { - UUID id PK - UUID orderId FK - UUID ownerId FK - ShiftStatus status - Timestamp createdAt - } - Order { - UUID id PK - UUID ownerId FK - UUID hubId FK - OrderStatus status - Timestamp createdAt - } - Position { - UUID id PK - UUID orderId FK - UUID roleId FK - UUID ownerId FK - Timestamp createdAt - } - Task { - UUID id PK - UUID ownerId FK - TaskStatus status - Timestamp createdAt - } - Team { - UUID id PK - String ownerId FK - String teamName - Timestamp createdAt - } - TeamMember { - UUID id PK - UUID teamId FK - UUID hubId FK - String memberName - Timestamp createdAt - } - Hub { - UUID id PK - UUID ownerId FK - String name - Timestamp createdAt - } - Account { - UUID id PK - UUID ownerId FK "polymorphic ownerId" - String bank - Timestamp createdAt - } - Document { - UUID id PK - UUID staffId FK - DocumentStatus status - Timestamp createdAt - } - Certificate { - UUID id PK - UUID staffId FK - CertificateStatus status - Timestamp createdAt - } - Contact { - UUID id PK - UUID staffId FK - String name - Timestamp createdAt - } - BenefitsData { - UUID id PK - UUID staffId FK - String title - Timestamp createdAt - } - Course { - UUID id PK - String title - Timestamp createdAt - } - TaxForm { - UUID id PK - UUID staffId FK - TaxFormStatus status - Timestamp createdAt - } - TimeSheet { - UUID id PK - UUID staffId FK - UUID shiftId FK - TimeSheetStatus status - Timestamp createdAt - } - Invoice { - UUID id PK - UUID ownerId FK - InvoiceStatus status - Timestamp createdAt - } - Assignment { - UUID id PK - UUID staffId FK - UUID ownerId FK - AssignmentStatus status - Timestamp createdAt - } - Conversation { - UUID id PK - String subject - Timestamp createdAt - } - Message { - UUID id PK - UUID conversationId FK - String senderId - Timestamp createdAt - } - Role { - UUID id PK - UUID ownerId FK - String name - Timestamp createdAt - } - RecentPayment { - UUID id PK - UUID payedUserId FK - UUID ownerId FK - RecentPaymentStatus status - Timestamp createdAt - } - RequiredDoc { - UUID id PK - UUID ownerId FK - ReqDocumentStatus status - Timestamp createdAt - } - VendorRate { - UUID id PK - UUID vendorId FK - String roleName - Timestamp createdAt - } - Schedule { - UUID id PK - UUID positionId FK - Timestamp createdAt - } - TaskComment { - UUID id PK - UUID taskId FK - String authorName - Timestamp createdAt - } - TeamHub { - UUID id PK - UUID teamId FK - String hubName - Timestamp createdAt - } - Application { - UUID id PK - UUID shiftId FK - UUID staffId FK - ApplicationStatus status - Timestamp createdAt - } - StaffShift { - UUID id PK - UUID staffId FK - UUID shiftId FK - Timestamp createdAt - } - MemberTask { - UUID id PK - UUID teamMemberId FK - UUID taskId FK - Timestamp createdAt - } - StaffCourse { - UUID id PK - UUID staffId FK - UUID courseId FK - Timestamp createdAt - } - - User ||--|{ Staff : "has profile" - User ||--|{ Vendor : "can be" - User ||--|{ Business : "can be" - User ||--o{ ActivityLog : "generates" - - Business ||--o{ "Order" : "creates" - Business ||--o{ Invoice : "receives" - Business ||--o{ Task : "owns" - Business ||--o{ Hub : "owns" - Business ||--o{ Role : "defines" - Business ||--o{ Shift : "posts" - Business ||--o{ Staff : "employs" - Business ||--o{ Account : "owns" - - Vendor ||--o{ VendorRate : "defines" - Vendor ||--o{ Task : "owns" - Vendor ||--o{ Hub : "owns" - Vendor ||--o{ Role : "defines" - Vendor ||--o{ Shift : "posts" - Vendor ||--o{ Staff : "employs" - Vendor ||--o{ Account : "owns" - - Staff ||--o{ Document : "has" - Staff ||--o{ Certificate : "holds" - Staff ||--o{ Contact : "has emergency" - Staff ||--o{ BenefitsData : "accrues" - Staff ||--o{ TaxForm : "submits" - Staff ||--o{ TimeSheet : "fills" - Staff ||--o{ Assignment : "receives" - Staff ||--o{ Account : "owns" - Staff ||--o{ RecentPayment : "is paid to" - Staff ||--o{ RequiredDoc : "owns" - Staff ||--o{ Application : "submits" - Hub ||--o{ Staff : "is based at" - - Shift ||--o{ TimeSheet : "generates" - Shift ||--o{ Application : "receives" - - "Order" ||--o{ Shift : "contains" - "Order" ||--o{ Position : "requires" - - Task ||--o{ TaskComment : "has" - - Team ||--o{ TeamMember : "has" - Team ||--o{ TeamHub : "operates in" - - Conversation ||--o{ Message : "contains" - - Position ||--o{ Schedule : "has" - Role ||--o{ Position : "is for" - - %% Join Tables - Staff ||--|{ StaffShift : "works" - Shift ||--|{ StaffShift : "is worked by" - Staff ||--|{ StaffCourse : "enrolls in" - Course ||--|{ StaffCourse : "is taken by" - TeamMember ||--|{ MemberTask : "assigned to" - Task ||--|{ MemberTask : "is assigned to" diff --git a/docs/backend-diagram/dataconnect-schemas-mutations-queries.mmd b/docs/backend-diagram/dataconnect-schemas-mutations-queries.mmd deleted file mode 100644 index f241b3a5..00000000 --- a/docs/backend-diagram/dataconnect-schemas-mutations-queries.mmd +++ /dev/null @@ -1,124 +0,0 @@ -flowchart LR - subgraph "Profile & Onboarding" - User --> User_Q["Queries
- listUsers
- getUserById"] - User --> User_M["Mutations
- createUser
- updateUser
- deleteUser"] - Staff --> Staff_Q["Queries
- listStaff
- getStaffById
- getStaffByUserId"] - Staff --> Staff_M["Mutations
- createStaff
- updateStaff
- deleteStaff"] - Contact --> Contact_Q["Queries
- listContacts
- getContactById
- listContactsByStaffId"] - Contact --> Contact_M["Mutations
- createContact
- updateContact
- deleteContact"] - AttireOption --> AttireOption_Q["Queries
- listAttireOptions
- getAttireOptionById"] - AttireOption --> AttireOption_M["Mutations
- createAttireOption
- updateAttireOption
- deleteAttireOption"] - end - - subgraph "Compliance" - Document --> Document_Q["Queries
- listDocuments
- getDocumentById
- listDocumentsByStaffId"] - Document --> Document_M["Mutations
- createDocument
- updateDocument
- deleteDocument"] - Certificate --> Certificate_Q["Queries
- listCertificates
- getCertificateById
- listCertificatesByStaffId"] - Certificate --> Certificate_M["Mutations
- CreateCertificate
- UpdateCertificate
- DeleteCertificate"] - TaxForm --> TaxForm_Q["Queries
- listTaxForms
- getTaxFormById
- getTaxFormsByStaffId
- filterTaxForms"] - TaxForm --> TaxForm_M["Mutations
- createTaxForm
- updateTaxForm
- deleteTaxForm"] - RequiredDoc --> RequiredDoc_Q["Queries
- listRequiredDocs
- getRequiredDocById
- listRequiredDocsByUserId"] - RequiredDoc --> RequiredDoc_M["Mutations
- createRequiredDoc
- updateRequiredDoc
- deleteRequiredDoc"] - end - - subgraph "Finances" - Account --> Account_Q["Queries
- listAccounts
- getAccountById
- listAccountsByOwnerId"] - Account --> Account_M["Mutations
- createAccount
- updateAccount
- deleteAccount"] - TimeSheet --> TimeSheet_Q["Queries
- listTimeSheets
- getTimeSheetById
- listTimeSheetsByStaffId"] - TimeSheet --> TimeSheet_M["Mutations
- createTimeSheet
- updateTimeSheet
- deleteTimeSheet"] - RecentPayment --> RecentPayment_Q["Queries
- listRecentPayments
- getRecentPaymentById
- listRecentPaymentsByUserId"] - RecentPayment --> RecentPayment_M["Mutations
- createRecentPayment
- updateRecentPayment
- deleteRecentPayment"] - Invoice --> Invoice_Q["Queries
- listInvoices
- getInvoiceById"] - Invoice --> Invoice_M["Mutations
- createInvoice
- updateInvoice
- deleteInvoice"] - InvoiceTemplate --> InvoiceTemplate_Q["Queries
- listInvoiceTemplates
- getInvoiceTemplateById"] - InvoiceTemplate --> InvoiceTemplate_M["Mutations
- createInvoiceTemplate
- updateInvoiceTemplate
- deleteInvoiceTemplate"] - VendorRate --> VendorRate_Q["Queries
- listVendorRates
- getVendorRateById"] - VendorRate --> VendorRate_M["Mutations
- createVendorRate
- updateVendorRate
- deleteVendorRate"] - CustomRateCard --> CustomRateCard_Q["Queries
- listCustomRateCards
- getCustomRateCardById"] - CustomRateCard --> CustomRateCard_M["Mutations
- createCustomRateCard
- updateCustomRateCard
- deleteCustomRateCard"] - end - - subgraph "Shifts & Work" - Shift --> Shift_Q["Queries
- listShifts
- getShiftById
- filterShifts"] - Shift --> Shift_M["Mutations
- CreateShift
- UpdateShift
- DeleteShift"] - Application --> Application_Q["Queries
- getApplicationById
- listApplicationsByStaffId"] - Application --> Application_M["Mutations
- createApplication
- updateApplication
- deleteApplication"] - StaffShift --> StaffShift_Q["Queries
- getMyShifts
- getStaffShiftById
- getStaffShiftsByShiftId"] - StaffShift --> StaffShift_M["Mutations
- createStaffShift
- updateStaffShift
- deleteStaffShift"] - StaffAvailability --> StaffAvailability_Q["Queries
- listStaffAvailabilities
- getStaffAvailabilityById
- getStaffAvailabilityByStaffId"] - StaffAvailability --> StaffAvailability_M["Mutations
- createStaffAvailability
- updateStaffAvailability
- deleteStaffAvailability"] - Assignment --> Assignment_Q["Queries
- listAssignments
- getAssignmentById
- listAssignmentsByStaffId"] - Assignment --> Assignment_M["Mutations
- CreateAssignment
- UpdateAssignment
- DeleteAssignment"] - Order --> Order_Q["Queries
- listOrders
- getOrderById"] - Order --> Order_M["Mutations
- createOrder
- updateOrder
- deleteOrder"] - Position --> Position_Q["Queries
- listPositions
- getPositionById
- listPositionsByOrderId"] - Position --> Position_M["Mutations
- createPosition
- updatePosition
- deletePosition"] - Category --> Category_Q["Queries
- listCategories
- getCategoryById"] - Category --> Category_M["Mutations
- createCategory
- updateCategory
- deleteCategory"] - Role --> Role_Q["Queries
- listRoles
- getRoleById"] - Role --> Role_M["Mutations
- createRole
- updateRole
- deleteRole"] - RoleCategory --> RoleCategory_Q["Queries
- listRoleCategories
- getRoleCategoryById"] - RoleCategory --> RoleCategory_M["Mutations
- createRoleCategory
- updateRoleCategory
- deleteRoleCategory"] - Schedule --> Schedule_Q["Queries
- listSchedules
- getScheduleById
- getScheduleByPositionId"] - Schedule --> Schedule_M["Mutations
- createSchedule
- updateSchedule
- deleteSchedule"] - Workforce --> Workforce_Q["Queries"] - Workforce --> Workforce_M["Mutations"] - end - - subgraph "Learning" - Course --> Course_Q["Queries
- listCourses
- getCourseById
- filterCourses"] - Course --> Course_M["Mutations
- createCourse
- updateCourse
- deleteCourse"] - Level --> Level_Q["Queries
- listLevels
- getLevelById"] - Level --> Level_M["Mutations
- createLevel
- updateLevel
- deleteLevel"] - StaffCourse --> StaffCourse_Q["Queries
- getStaffCourseById
- listStaffCoursesByStaffId
- listStaffCoursesByCourseId
- getStaffCourseByStaffAndCourse"] - StaffCourse --> StaffCourse_M["Mutations
- createStaffCourse
- updateStaffCourse
- deleteStaffCourse"] - end - - subgraph "Benefits" - BenefitsData --> BenefitsData_Q["Queries
- listBenefitsData
- getBenefitsDataById
- getBenefitsDataByStaffId"] - BenefitsData --> BenefitsData_M["Mutations
- createBenefitsData
- updateBenefitsData
- deleteBenefitsData"] - end - - subgraph "Business & Vendors" - Business --> Business_Q["Queries
- listBusinesses
- getBusinessById
- getBusinessesByUserId"] - Business --> Business_M["Mutations
- createBusiness
- updateBusiness
- deleteBusiness"] - Vendor --> Vendor_Q["Queries
- listVendors
- getVendorById"] - Vendor --> Vendor_M["Mutations
- createVendor
- updateVendor
- deleteVendor"] - Hub --> Hub_Q["Queries
- listHubs
- getHubById"] - Hub --> Hub_M["Mutations
- createHub
- updateHub
- deleteHub"] - end - - subgraph "Teams" - Team --> Team_Q["Queries
- listTeams
- getTeamById"] - Team --> Team_M["Mutations
- createTeam
- updateTeam
- deleteTeam"] - TeamMember --> TeamMember_Q["Queries
- listTeamMembers
- getTeamMemberById
- listTeamMembersByTeamId"] - TeamMember --> TeamMember_M["Mutations
- createTeamMember
- updateTeamMember
- deleteTeamMember"] - MemberTask --> MemberTask_Q["Queries
- getMyTasks
- getMemberTaskById
- getMemberTasksByTaskId"] - MemberTask --> MemberTask_M["Mutations
- createMemberTask
- updateMemberTask
- deleteMemberTask"] - TeamHub --> TeamHub_Q["Queries
- listTeamHubs
- getTeamHubById
- listTeamHubsByTeamId"] - TeamHub --> TeamHub_M["Mutations
- createTeamHub
- updateTeamHub
- deleteTeamHub"] - Task --> Task_Q["Queries
- listTasks
- getTaskById"] - Task --> Task_M["Mutations
- createTask
- updateTask
- deleteTask"] - TaskComment --> TaskComment_Q["Queries
- listTaskComments
- getTaskCommentById
- listTaskCommentsByTaskId"] - TaskComment --> TaskComment_M["Mutations
- createTaskComment
- updateTaskComment
- deleteTaskComment"] - end - - subgraph "Communication" - Conversation --> Conversation_Q["Queries
- listConversations
- getConversationById
- getConversationsByUserId"] - Conversation --> Conversation_M["Mutations
- createConversation
- updateConversation
- deleteConversation"] - Message --> Message_Q["Queries
- listMessages
- getMessageById
- listMessagesByConversationId"] - Message --> Message_M["Mutations
- createMessage
- updateMessage
- deleteMessage"] - end - - subgraph "Others" - ActivityLog --> ActivityLog_Q["Queries
- listActivityLogs
- getActivityLogById
- listActivityLogsByUserId"] - ActivityLog --> ActivityLog_M["Mutations
- createActivityLog
- updateActivityLog
- deleteActivityLog"] - ClientFeedback --> ClientFeedback_Q["Queries
- listClientFeedbacks
- getClientFeedbackById"] - ClientFeedback --> ClientFeedback_M["Mutations
- createClientFeedback
- updateClientFeedback
- deleteClientFeedback"] - FaqData --> FaqData_Q["Queries
- listFaqDatas
- getFaqDataById"] - FaqData --> FaqData_M["Mutations
- createFaqData
- updateFaqData
- deleteFaqData"] - end - - subgraph "Reporting" - Reports --> Reports_Q["Queries
- getCoverageReport
- getNoShowReport
- getSpendReport
- getForecastReport
- getPerformanceReport
- getDailyOpsReport"] - end diff --git a/docs/backend-diagram/staff_app_diagram.mmd b/docs/backend-diagram/staff_app_diagram.mmd deleted file mode 100644 index d251a18e..00000000 --- a/docs/backend-diagram/staff_app_diagram.mmd +++ /dev/null @@ -1,121 +0,0 @@ -flowchart LR - -subgraph L1["login/create user"] - S_auth_phone["phone_verification_screen.dart"] - S_auth_phone --> S_auth_phone_Q["Queries
* user - getUserById
* staff - getStaffByUserId"] - S_auth_phone --> S_auth_phone_M["Mutations
* user - createUser"] - S_auth_phone --> S_auth_phone_F["Firebase
* user - auth"] -end - -subgraph L2["Profile"] - S_worker_profile["worker_profile_screen.dart"] - S_worker_profile --> S_worker_profile_Q["Queries
* user - getUserById
* staff - getStaffByUserId"] -end - -subgraph L3["Personal info"] - S_personal_info["personal_info_screen.dart"] - S_personal_info --> S_personal_info_Q["Queries
* staff - getStaffByUserId"] - S_personal_info --> S_personal_info_M["Mutations
* staff - UpdateStaff"] -end - -subgraph L4["Emergency Contact"] - S_emergency["emergency_contact_screen.dart"] - S_emergency --> S_emergency_Q["Queries
* contact - getContactsByStaffId"] - S_emergency --> S_emergency_M["Mutations
* contact - updateContact
* contact - createContact
* contact - deleteContact"] -end - -subgraph L5["Experience & skills"] - S_experience["experience_screen.dart"] - S_experience --> S_experience_Q["Queries
* staff - getStaffByUserId"] - S_experience --> S_experience_M["Mutations
* staff - UpdateStaff"] -end - -subgraph L6["Attire"] - S_attire["attire_screen.dart"] - S_attire --> S_attire_Q["Queries
* attireOption - listAttireOptions
* staff - getStaffByUserId"] - S_attire --> S_attire_M["Mutations
* staff - UpdateStaff"] -end - -subgraph L7["Documents"] - S_documents["documents_screen.dart"] - S_documents --> S_documents_Q["Queries
* document - getDocumentsByStaffId"] - S_documents --> S_documents_M["Mutations
* document - updateDocument"] -end - -subgraph L8["Certificates"] - S_certificates["certificates_screen.dart"] - S_certificates --> S_certificates_Q["Queries
* certificate - listCertificatesByStaffId"] - S_certificates --> S_certificates_M["Mutations
* certificate - UpdateCertificate
* certificate - CreateCertificate
* certificate - DeleteCertificate"] -end - -subgraph L9["Tax Documents"] - S_tax_forms["tax_forms_screen.dart"] - S_tax_forms --> S_tax_forms_Q["Queries
* taxForm - getTaxFormsBystaffId"] - S_tax_forms --> S_tax_forms_M["Mutations
* taxForm - createTaxForm
* taxForm - updateTaxForm"] -end - -subgraph L10["KROW University"] - S_uni["krow_university_screen.dart"] - S_uni --> S_uni_Q["Queries
* course - listCourses
* staffCourse - listStaffCoursesByStaffId
* staff - getStaffByUserId
* level - listLevels
* certificate - listCertificatesByStaffId"] -end - -subgraph L11["Trainings"] - S_trainings["trainings_screen.dart"] - S_trainings --> S_trainings_Q["Queries
* course - listCourses
* staffCourse - listStaffCoursesByStaffId"] -end - -subgraph L12["Leaderboard"] - S_leaderboard["leaderboard_screen.dart"] - S_leaderboard --> S_leaderboard_Q["Queries
* staffCourse - missing"] -end - -subgraph L13["Bank Account"] - S_bank["bank_account_screen.dart"] - S_bank --> S_bank_Q["Queries
* account - getAccountsByOwnerId"] - S_bank --> S_bank_M["Mutations
* account - createAccount
* account - updateAccount
* account - deleteAccount"] -end - -subgraph L14["Earnings/Payments"] - S_payments["payments_screen.dart"] - S_payments --> S_payments_Q["Queries
* recentPayment - getRecentPaymentsByPayedUserId"] -end - -subgraph L15["Timecard"] - S_timecard["time_card_screen.dart"] - S_timecard --> S_timecard_Q["Queries
* timeSheet - getTimeSheetsByStaffId"] -end - -subgraph L16["Clock in"] - S_clockin["clock_in_screen.dart"] - S_clockin --> S_clockin_Q["Queries
* application - getApplicationsByStaffId"] - S_clockin --> S_clockin_M["Mutations
* application - createApplication
* application - updateApplicationStatus"] -end - -subgraph L17["Shifts"] - S_shifts["shifts_screen.dart"] - S_shifts --> S_shifts_Q["Queries
* application - getApplicationsByStaffId
* shift - filterShifts
* timeSheet - getTimeSheetsByStaffId"] - S_shifts --> S_shifts_M["Mutations
* application - updateApplicationStatus
* shift - CreateShift
* application - createApplication
* staffShift - createStaffShift"] -end - -subgraph L18["My availability"] - S_availability["availability_screen.dart"] - S_availability --> S_availability_Q["Queries
* staffAvailability - getStaffAvailabilityByStaffId"] - S_availability --> S_availability_M["Mutations
* staffAvailability - updateStaffAvailability
* staffAvailability - createStaffAvailability
* staffAvailability - deleteStaffAvailability"] -end - -subgraph L19["Your Benefits Overview"] - S_benefits["benefits_screen.dart"] - S_benefits --> S_benefits_Q["Queries
* benefitsData - getBenefitsDataByStaffId"] - S_benefits --> S_benefits_M["Mutations
* benefitsData - updateBenefitsData"] -end - -subgraph L20["Home"] - S_home["worker_home_screen.dart"] - S_home --> S_home_Q["Queries
* application - getApplicationsByStaffId
* shift - filterShifts
* benefitsData - getBenefitsDataByStaffId"] -end - -subgraph L21["Shift detail"] - S_shift_detail["shift_details_screen.dart"] - S_shift_detail --> S_shift_detail_Q["Queries
* application - getApplicationsByStaffId"] - S_shift_detail --> S_shift_detail_M["Mutations
* application - updateApplicationStatus"] -end