Promotion Caregiver Analytics Gap Mining
Promotion Caregiver Analytics Gap Mining
Section titled “Promotion Caregiver Analytics Gap Mining”Scope: appended source-mining queue for legacy promotion/shop operations, caregiver profile credential dossier, care-delivery report/service/attendance obligations, push/notify flows, and admin analytics report catalog. This page keeps new hotspots separate so settlement and branch pages do not get rewritten.
Source Component Map
Section titled “Source Component Map”flowchart LR AdminPromotion[Admin Promotion.php] CouponModel[Coupon_model.php] PromotionModel[Promotion_model.php] MomfirstModel[Momfirst_model.php] AdminManager[Admin Manager.php] AdminManagerModel[Admin Manager_model.php] ManagerPortal[Manager User.php] ManagerUserModel[Manager User_model.php] ReportController[Report.php] ServiceController[Service.php] AttendanceController[Attendance.php] NotifyModel[Notify_model.php] StatisticsModel[Statistics_model.php] PromotionEntitlement[PromotionEntitlement] GiftFulfillment[GiftFulfillment] MomfirstDelivery[MomfirstDelivery] CaregiverDossier[CaregiverCredentialDossier] CareDeliveryObligation[CareDeliveryObligation] AnalyticsCatalog[AdminAnalyticsCatalog] AdminPromotion --> CouponModel --> PromotionEntitlement AdminPromotion --> PromotionModel --> GiftFulfillment AdminPromotion --> MomfirstModel --> MomfirstDelivery AdminManager --> AdminManagerModel --> CaregiverDossier ManagerPortal --> ManagerUserModel --> CaregiverDossier NotifyModel --> CareDeliveryObligation ReportController --> CareDeliveryObligation ServiceController --> CareDeliveryObligation AttendanceController --> CareDeliveryObligation StatisticsModel --> AnalyticsCatalog
Promotion And Shop
Section titled “Promotion And Shop”-
Promotion entitlement lifecycle. Status:
Pending. Evidence:source-refs/sanmopia-admin/application/controllers/Promotion.php:293-307,source-refs/sanmopia-admin/application/models/Coupon_model.php:10-23,source-refs/sanmopia-admin/application/models/Coupon_model.php:33-160, andsource-refs/sanmopia-admin/application/models/Coupon_model.php:240-323. Source behavior: coupon screens are HQ-only, source coupon types includePRODUCT1andPRODUCT2, service interruption/cancel can hard-delete existing coupon rows, reissue 1-week or 2-week gift coupon by real attendance count, and publish USER coupon rows with six-month expiry. Modern gap:PromotionEntitlementmust keep immutable entitlement rule version, reservation source, service-day evidence, cancellation/interruption reason, replacement/reissue lineage, expiry, and settlement participation. Hard delete cannot be target behavior. -
Gift fulfillment operations. Status:
Pending. Evidence:source-refs/sanmopia-admin/application/controllers/Promotion.php:312-340,source-refs/sanmopia-admin/application/controllers/Promotion.php:533-542, andsource-refs/sanmopia-admin/application/models/Promotion_model.php:18-55. Source behavior: gift detail edits product application contact, address, complete date, shipper, tracking number, and memo directly onPRODUCT_APPLY_TB. Modern gap:GiftFulfillmentRequestneeds recipient snapshot, address version, shipment carrier/tracking, fulfillment status, operator memo, status timeline, and audit. It should link to promotion entitlement, not mutate application row as current truth. -
Momfirst DB send and result-file delivery. Status:
Pending. Evidence:source-refs/sanmopia-admin/application/controllers/Promotion.php:345-397,source-refs/sanmopia-admin/application/controllers/Promotion.php:486-564,source-refs/sanmopia-admin/application/models/Momfirst_model.php:12-68,source-refs/sanmopia-admin/application/models/Momfirst_model.php:70-183, andsource-refs/sanmopia-admin/application/models/Momfirst_model.php:198-272. Source behavior:LOVEBOX/MILKfilters, branch filter, DB-send date, service-start date, not-send log, PDF-only file upload, push notification, publicOPENURL, and force-download all live in admin source. Modern gap:MomfirstDeliverymust split DB-send export, no-send reason log, uploaded analysis artifact, recipient notification, download grant, and branch/HQ visibility. Result files need Storage keys, checksum, result type, uploaded by, previous artifact supersession, signed download, and customer-safe access audit.
Caregiver Credential Dossier
Section titled “Caregiver Credential Dossier”-
Caregiver profile credential dossier. Status:
Pending. Evidence:source-refs/sanmopia-admin/application/controllers/Manager.php:47-106,source-refs/sanmopia-admin/application/controllers/Manager.php:133-252,source-refs/sanmopia-admin/application/controllers/Manager.php:340-544,source-refs/sanmopia-admin/application/models/Manager_model.php:116-238,source-refs/sanmopia-admin/application/models/Manager_model.php:1530-1695,source-refs/sanmopia-admin/application/models/Manager_model.php:1698-1799,source-refs/sanmopia-admin/application/models/Manager_model.php:1802-2144,source-refs/sanmopia-manager/application/controllers/User.php:242-379,source-refs/sanmopia-manager/application/controllers/User.php:441-740, andsource-refs/sanmopia-manager/application/models/User_model.php:157-247. Source behavior: admin and manager portal both mutate profile image, sign image, account, career, education, health, denied days, greeting, FCM token, address, and password. Images are uploaded to legacy folders and previous files are deleted. Modern gap:CaregiverCredentialDossiershould hold versioned profile facts, account references, credential documents, education records, health documents, signed image asset, profile image asset, address coordinates, and actor/source channel. Self-service and admin changes require separate command origins, review state, supersession, retention policy, and Storage audit. -
Credential admission and public-rating moderation. Status:
Pending. Evidence:source-refs/sanmopia-admin/application/controllers/Manager.php:1013-1021,source-refs/sanmopia-admin/application/controllers/Manager.php:1378-1425,source-refs/sanmopia-admin/application/controllers/Manager.php:1981-2078,source-refs/sanmopia-admin/application/models/Manager_model.php:2194-2242,source-refs/sanmopia-admin/application/models/Manager_model.php:2244-2278, andsource-refs/sanmopia-admin/application/models/Manager_model.php:2280-2295. Source behavior: admin togglesSHOW_FLfor main/sub caregiver user comments, togglesADMISSION_FLfor education and career records, and edits recommended manager branch/contact data. Modern gap:CaregiverCredentialReviewandCaregiverPublicFeedbackModerationneed reviewer, reason, before/after visibility, linked document id, approval status, and audit timeline. Recommendation intake should be its ownCaregiverReferralCandidate, not mixed with credential dossier rows. -
Caregiver self-service security and device tokens. Status:
Pending. Evidence:source-refs/sanmopia-manager/application/controllers/User.php:787-854,source-refs/sanmopia-manager/application/models/User_model.php:866-917, andsource-refs/sanmopia-manager/application/models/User_model.php:919-1005. Source behavior: self-service FCM token, address geocoding, password rotation, and credential deletes are direct row updates/deletes. Modern gap:CaregiverAccountSecurityEventmust record password verification result, new session/auth token, device token lifecycle, address geocoding result, and delete/supersede events for credentials instead of physical deletion. 2026-07-06 backend foundationbf38296covers the address/device-token subset withcaregiver_management/features/caregiver_profile_contact_revision; password rotation and credential delete/supersede events remain pending in this broader gap.
Report Service Attendance Notify
Section titled “Report Service Attendance Notify”-
Care-delivery obligation scheduler. Status:
Pending. Evidence:source-refs/sanmopia-manager/application/models/Notify_model.php:70-164,source-refs/sanmopia-manager/application/models/Notify_model.php:166-354, andsource-refs/sanmopia-manager/application/models/Notify_model.php:354-448. Source behavior: notify rows useREPORT_FIRST,REPORT_PROGRESS,REPORT_LAST, andSERVICE; some legacy helper paths hardcode historicalCREATED_DTvalues; current report/service queries include statuses0,3,4,5,6,11,12and exclude status13, while historical repair helpers include13and hardcode2021-08-31 07:00:00/2021-09-01 07:00:00; read-notify can create attendance rows. Modern gap:CareDeliveryObligationshould be generated from service calendar, assignment role, report kind, service date, obligation due time, assignee, read/submitted status, and retry policy.CareDeliveryNotificationWorkQueuenow owns retry/dead-letter/suppress/repair action vocabulary; remaining proof is persistence and worker/operator wiring. Attendance creation must not be a hidden side effect of reading notification state. -
Daily caregiver report submission. Status:
Pending. Evidence:source-refs/sanmopia-manager/application/controllers/Report.php:1-106andsource-refs/sanmopia-manager/application/models/Report_model.php:11-100. Source behavior: controller checks notify ownership, blocks already-read notify, loads question set by첫째날,진행중, or마지막날, then stores objective answers and essay answers in separate tables. Modern gap:DailyCareReportSubmissionneeds obligation id, question-set version, structured answers, essay answers, caregiver role, reservation id, service date, submitted-at, and idempotency key. Read-notify is not enough as submission status. -
Service record and attendance submit flow. Status:
Pending. Evidence:source-refs/sanmopia-manager/application/controllers/Service.php:1-254,source-refs/sanmopia-manager/application/models/Service_model.php:10-135, andsource-refs/sanmopia-manager/application/controllers/Attendance.php:1-80. Source behavior: service record supports main/sub caregiver ownership, primary tableMANAGER_SERVICE_TB, sub tableMANAGER_SUB_SERVICE_TB, duplicate check by reservation/date only, mother/baby/caregiver health fields, respiratory symptoms, retroactive payment note, newborn name/weight bootstrap, and main-caregiver notify read. Schedule UI has route/date mismatch, hardcoded sub visibility through manager id1, andSUB_READ_FLwithout a matching writer. Attendance blocks duplicate same-day check-in and sends mother push about no fever/respiratory abnormality. Modern replacement:CaregiverServiceRecordSubmissionnow owns role/handoff identity, service date access window, duplicate replay, correction revision, route date, sequential writable action, and explicit attendance outbox key. Remaining proof: Supabase persistence/API, newborn bootstrap facts, FCM delivery attempt storage, mother-visible notification audit, and printable snapshot integration for document ids6and20.
Analytics And Admin Report Catalog
Section titled “Analytics And Admin Report Catalog”-
Admin analytics report catalog. Status:
Pending. Evidence:source-refs/sanmopia-admin/application/models/Statistics_model.php:10-163,source-refs/sanmopia-admin/application/models/Statistics_model.php:238-360,source-refs/sanmopia-admin/application/models/Statistics_model.php:760-1044,source-refs/sanmopia-admin/application/models/Statistics_model.php:1062-1216, andsource-refs/sanmopia-admin/application/models/Statistics_model.php:1971-2137. Source behavior: one model routes performance, sales, user-connect, evaluation, user, branch connect, and detail datatables. It embeds status ids, branch exclusions, payment-date rules, service-day filters, coupon/fee math, and total-row aggregation. Modern gap:AdminAnalyticsCatalogshould declare each report id, audience, filters, metric definitions, source fact tables, branch visibility, export support, freshness, and row-level authorization. SQL-specific status ids and branch exclusions become adapter evidence, not product vocabulary. -
Analytics/export snapshot reproducibility. Status:
Pending. Evidence:source-refs/sanmopia-admin/application/controllers/Promotion.php:545-564,source-refs/sanmopia-admin/application/models/Statistics_model.php:1271-1295, andsource-refs/sanmopia-admin/application/models/Statistics_model.php:1971-2025. Source behavior: list/export paths build current SQL rows on demand and recompute totals in PHP. Modern gap:AdminReportExportRequestshould freeze filter input, query version, generated columns, row count, totals, artifact key, signed download state, and operator audit. Report exports need column tests so performance/sales/branch connect metrics do not drift when reservation/payment adapters change.
Checklist Merge Targets
Section titled “Checklist Merge Targets”- Add
PromotionEntitlement,GiftFulfillmentRequest, andMomfirstDeliveryunder customer engagement commerce. - Add
CaregiverCredentialDossier,CaregiverCredentialReview,CaregiverPublicFeedbackModeration,CaregiverReferralCandidate, andCaregiverAccountSecurityEventunder caregiver profile operations. - Add
CareDeliveryObligation,DailyCareReportSubmission,ServiceRecordSubmission, andCaregiverAttendanceCheckInunder care delivery documents and notifications. - Add
AdminAnalyticsCatalogandAdminReportExportRequestunder admin analytics/reporting.