@feedmepos/mf-hrm-portal 2.3.2-dev → 2.3.2-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ApprovalCodeList-xOyDG5ug.js → ApprovalCodeList-sHnINTik.js} +14 -15
- package/dist/AuditLogList-C9C2emU9.js +1950 -0
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-Cixg_icC.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BbsPesWY.js} +2 -2
- package/dist/{EmployeeList-BG2KPvOB.js → EmployeeList-D4oy5hXz.js} +196 -208
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-Cl053Tg1.js +90 -0
- package/dist/{GrantUserList-CUkuf3VV.js → GrantUserList-LWpqhl-5.js} +15 -16
- package/dist/{Main-BcixH7R5.js → Main-BWKb-QIE.js} +11 -11
- package/dist/{Main-BSHf8gTE.js → Main-CVGiOYpC.js} +12 -11
- package/dist/{Main-Cg9SOzcz.js → Main-PBJjfzBg.js} +5 -5
- package/dist/{MyPosProfile-CN8Bj3aV.js → MyPosProfile-BQCBFMFw.js} +1 -1
- package/dist/{PermissionSetList-I3u2_qHR.js → PermissionSetList-D2qZVlF4.js} +32 -31
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BBoRXQPn.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-ZSREAS1r.js} +927 -927
- package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DRGTxOMW.js +1831 -0
- package/dist/ResponsiveContextMenu.vue_vue_type_script_setup_true_lang-mSJFKo7r.js +132 -0
- package/dist/RoleForm.vue_vue_type_script_setup_true_lang-DFDTw0lj.js +547 -0
- package/dist/RoleList-DG0crFzW.js +274 -0
- package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-Cs0rhCa3.js +544 -0
- package/dist/ScheduleGeneralPage-C4J6jYtG.js +811 -0
- package/dist/ScheduleModal.vue_vue_type_script_setup_true_lang-3UqO6uPu.js +2557 -0
- package/dist/SchedulePage-ICzggri0.js +19458 -0
- package/dist/SchedulePositionPage-BshUCd_C.js +282 -0
- package/dist/SelectFilter-D9T0nFvG.js +264 -0
- package/dist/TeamMemberList-C970Iqlj.js +2086 -0
- package/dist/{TimesheetList-CECFKt7H.js → TimesheetList-nxhr0EWj.js} +10 -10
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-RIyoAmeb.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-BLqgALLe.js} +3 -3
- package/dist/{app-CdrnR_Pw.js → app-n6d4AmtP.js} +12373 -4651
- package/dist/app.js +1 -1
- package/dist/{approval-code-Bwvwehz9.js → approval-code-1j1OoXt1.js} +1 -1
- package/dist/{dayjs.min-BO8bcI17.js → dayjs.min-DdNivv4b.js} +26 -26
- package/dist/{employee-Dg-J9goA.js → employee-BlfleiCU.js} +40 -35
- package/dist/{grant-user-whFOaPZI.js → grant-user-BmTyexk3.js} +1 -1
- package/dist/{iteration-ZpERYj3o.js → iteration-y_jodvfN.js} +1 -1
- package/dist/{lodash-7SZBZ8VQ.js → lodash-B2eWEGH4.js} +1 -1
- package/dist/{member-grant-C46lvrh2.js → member-grant-CzZUdO_s.js} +2 -2
- package/dist/object-Dwyg2LgX.js +16 -0
- package/dist/restaurant-Dl6yx37M.js +51 -0
- package/dist/{role-C6hFKOfU.js → role-DfZi7Ssk.js} +3 -3
- package/dist/{rule-BlMymDXm.js → rule-ChmhcGgA.js} +13 -13
- package/dist/src/api/audit-log/index.d.ts +4 -0
- package/dist/src/api/employee/index.d.ts +2 -2
- package/dist/src/api/restaurant/index.d.ts +2 -0
- package/dist/src/api/schedule/index.d.ts +68 -0
- package/dist/src/api/sso-provider/index.d.ts +5 -0
- package/dist/src/api/staff-invite/index.d.ts +1 -2
- package/dist/src/components/AppForm.vue.d.ts +2 -2
- package/dist/src/components/CheckboxInput.vue.d.ts +2 -2
- package/dist/src/components/layout/PortalShell.vue.d.ts +12 -0
- package/dist/src/components/layout/SchedulePromoBanner.vue.d.ts +2 -0
- package/dist/src/components/layout/withScheduleShell.d.ts +10 -0
- package/dist/src/composables/useDiscardConfirm.d.ts +3 -1
- package/dist/src/composables/useMessage.d.ts +8 -2
- package/dist/src/composables/useSsoProviders.d.ts +19 -0
- package/dist/src/composables/useStaffInviteProviders.d.ts +1 -12
- package/dist/src/helpers/pos-assignment-rows.d.ts +2 -0
- package/dist/src/helpers/staff-invite.d.ts +3 -0
- package/dist/src/router/shared.d.ts +3 -0
- package/dist/src/stores/employee.d.ts +12 -12
- package/dist/src/types/employee.d.ts +1 -0
- package/dist/src/types/schedule.d.ts +23 -0
- package/dist/src/types/sso-provider.d.ts +10 -0
- package/dist/src/views/audit-log/constants.d.ts +9 -30
- package/dist/src/views/audit-log/locales/index.d.ts +488 -0
- package/dist/src/views/audit-log/pos-row.d.ts +27 -0
- package/dist/src/views/hr/locales/index.d.ts +20 -0
- package/dist/src/views/hr/role/RoleForm.vue.d.ts +29 -2
- package/dist/src/views/scheduling/ScheduleGeneralPage.vue.d.ts +3 -0
- package/dist/src/views/scheduling/SchedulePage.vue.d.ts +3 -0
- package/dist/src/views/scheduling/SchedulePositionPage.vue.d.ts +3 -0
- package/dist/src/views/scheduling/components/ScheduleAddEmployeeIdentitySection.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleAddEmployeeModal.vue.d.ts +12 -0
- package/dist/src/views/scheduling/components/ScheduleAddEmployeeModeStep.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleAddEmployeePosAccessSection.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleAddEmployeePositionsSection.vue.d.ts +10 -0
- package/dist/src/views/scheduling/components/ScheduleAddEmployeeSchedulingSection.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleAddPickPopover.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleAddPositionModal.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleAreaRows.vue.d.ts +41 -0
- package/dist/src/views/scheduling/components/ScheduleAutoScheduleDetailsModal.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleAutoScheduleDoneArt.vue.d.ts +2 -0
- package/dist/src/views/scheduling/components/ScheduleAutoScheduleModal.vue.d.ts +10 -0
- package/dist/src/views/scheduling/components/ScheduleBoardAreaRows.vue.d.ts +25 -0
- package/dist/src/views/scheduling/components/ScheduleBoardEditOverlays.vue.d.ts +17 -0
- package/dist/src/views/scheduling/components/ScheduleBoardEmployeeRows.vue.d.ts +31 -0
- package/dist/src/views/scheduling/components/ScheduleBoardGridHeader.vue.d.ts +29 -0
- package/dist/src/views/scheduling/components/ScheduleBoardInteractionOverlays.vue.d.ts +34 -0
- package/dist/src/views/scheduling/components/ScheduleBoardOnboardingOverlays.vue.d.ts +26 -0
- package/dist/src/views/scheduling/components/ScheduleBoardRails.vue.d.ts +17 -0
- package/dist/src/views/scheduling/components/ScheduleBoardToolbar.vue.d.ts +38 -0
- package/dist/src/views/scheduling/components/ScheduleBoardUtilityOverlays.vue.d.ts +22 -0
- package/dist/src/views/scheduling/components/ScheduleButton.vue.d.ts +23 -0
- package/dist/src/views/scheduling/components/ScheduleChangeEmployeeModal.vue.d.ts +8 -0
- package/dist/src/views/scheduling/components/ScheduleCloneOutletModal.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleCoach.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleCompletionDialog.vue.d.ts +15 -0
- package/dist/src/views/scheduling/components/ScheduleConfirmModal.vue.d.ts +33 -0
- package/dist/src/views/scheduling/components/ScheduleContextMenu.vue.d.ts +17 -0
- package/dist/src/views/scheduling/components/ScheduleCostRail.vue.d.ts +8 -0
- package/dist/src/views/scheduling/components/ScheduleCostRailEmptyArt.vue.d.ts +2 -0
- package/dist/src/views/scheduling/components/ScheduleDateRangePopover.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleDayNotePopover.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleDayTimeline.vue.d.ts +17 -0
- package/dist/src/views/scheduling/components/ScheduleDemandRow.vue.d.ts +23 -0
- package/dist/src/views/scheduling/components/ScheduleDemandSheet.vue.d.ts +10 -0
- package/dist/src/views/scheduling/components/ScheduleDotsIcon.vue.d.ts +2 -0
- package/dist/src/views/scheduling/components/ScheduleEmployeeDetailPanel.vue.d.ts +12 -0
- package/dist/src/views/scheduling/components/ScheduleEmployeeIdentity.vue.d.ts +17 -0
- package/dist/src/views/scheduling/components/ScheduleExportPreview.vue.d.ts +7 -0
- package/dist/src/views/scheduling/components/ScheduleFilterBar.vue.d.ts +18 -0
- package/dist/src/views/scheduling/components/ScheduleGapPopover.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleGridHeader.vue.d.ts +18 -0
- package/dist/src/views/scheduling/components/ScheduleGridSkeleton.vue.d.ts +2 -0
- package/dist/src/views/scheduling/components/ScheduleLeaveEditModal.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleLoadState.vue.d.ts +9 -0
- package/dist/src/views/scheduling/components/ScheduleModal.vue.d.ts +26 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingAssignPositionModal.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingClosedDayConfirm.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingDemandDays.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingDemandFooter.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingDemandHeader.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingDoneArt.vue.d.ts +2 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingHoursProfileNotice.vue.d.ts +10 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingPositions.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingReview.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingSettings.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingWelcome.vue.d.ts +11 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingWizard.vue.d.ts +9 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingWizardFooter.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingWizardHeader.vue.d.ts +11 -0
- package/dist/src/views/scheduling/components/SchedulePublishModal.vue.d.ts +8 -0
- package/dist/src/views/scheduling/components/SchedulePublishShareArt.vue.d.ts +2 -0
- package/dist/src/views/scheduling/components/ScheduleReviewBar.vue.d.ts +12 -0
- package/dist/src/views/scheduling/components/ScheduleSelect.vue.d.ts +70 -0
- package/dist/src/views/scheduling/components/ScheduleSelectExistingEmployeeModal.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleSetupBanner.vue.d.ts +12 -0
- package/dist/src/views/scheduling/components/ScheduleShiftCell.vue.d.ts +35 -0
- package/dist/src/views/scheduling/components/ScheduleShiftHeadcountEditor.vue.d.ts +10 -0
- package/dist/src/views/scheduling/components/ScheduleShiftImpact.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleShiftMoreOptions.vue.d.ts +8 -0
- package/dist/src/views/scheduling/components/ScheduleShiftPopover.vue.d.ts +16 -0
- package/dist/src/views/scheduling/components/ScheduleShiftRepeatDaysRow.vue.d.ts +8 -0
- package/dist/src/views/scheduling/components/ScheduleShiftSegmentsEditor.vue.d.ts +8 -0
- package/dist/src/views/scheduling/components/ScheduleShiftWhoPicker.vue.d.ts +25 -0
- package/dist/src/views/scheduling/components/ScheduleStaffRail.vue.d.ts +16 -0
- package/dist/src/views/scheduling/components/ScheduleStaffRows.vue.d.ts +50 -0
- package/dist/src/views/scheduling/components/ScheduleStatsRow.vue.d.ts +12 -0
- package/dist/src/views/scheduling/components/ScheduleSwapShiftsModal.vue.d.ts +8 -0
- package/dist/src/views/scheduling/components/ScheduleTimePickerPopover.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleTopbar.vue.d.ts +20 -0
- package/dist/src/views/scheduling/composables/auto-schedule-mapping.d.ts +35 -0
- package/dist/src/views/scheduling/composables/onboarding-constants.d.ts +7 -0
- package/dist/src/views/scheduling/composables/onboarding-hours.d.ts +7 -0
- package/dist/src/views/scheduling/composables/onboarding-types.d.ts +51 -0
- package/dist/src/views/scheduling/composables/remyPrompt.d.ts +15 -0
- package/dist/src/views/scheduling/composables/schedule-add-employee-form.d.ts +82 -0
- package/dist/src/views/scheduling/composables/schedule-board-helpers.d.ts +63 -0
- package/dist/src/views/scheduling/composables/schedule-breaks.d.ts +9 -0
- package/dist/src/views/scheduling/composables/schedule-calendar.d.ts +17 -0
- package/dist/src/views/scheduling/composables/schedule-cost.d.ts +24 -0
- package/dist/src/views/scheduling/composables/schedule-currency.d.ts +22 -0
- package/dist/src/views/scheduling/composables/schedule-day-meta.d.ts +21 -0
- package/dist/src/views/scheduling/composables/schedule-demand-domain.d.ts +23 -0
- package/dist/src/views/scheduling/composables/schedule-employee-profile.d.ts +7 -0
- package/dist/src/views/scheduling/composables/schedule-error.d.ts +1 -0
- package/dist/src/views/scheduling/composables/schedule-export-matrix.d.ts +14 -0
- package/dist/src/views/scheduling/composables/schedule-leave-split.d.ts +9 -0
- package/dist/src/views/scheduling/composables/schedule-popover-position.d.ts +16 -0
- package/dist/src/views/scheduling/composables/schedule-quick-pick.d.ts +23 -0
- package/dist/src/views/scheduling/composables/schedule-shift-time.d.ts +29 -0
- package/dist/src/views/scheduling/composables/schedule-time.d.ts +8 -0
- package/dist/src/views/scheduling/composables/schedule-week-cache.d.ts +9 -0
- package/dist/src/views/scheduling/composables/useCollapsedList.d.ts +9 -0
- package/dist/src/views/scheduling/composables/useRemyAppStore.d.ts +16 -0
- package/dist/src/views/scheduling/composables/useScheduleAddEmployee.d.ts +137 -0
- package/dist/src/views/scheduling/composables/useScheduleAddPick.d.ts +75 -0
- package/dist/src/views/scheduling/composables/useScheduleAreaBoard.d.ts +50 -0
- package/dist/src/views/scheduling/composables/useScheduleAreaDragDrop.d.ts +11 -0
- package/dist/src/views/scheduling/composables/useScheduleAssignmentMutations.d.ts +13 -0
- package/dist/src/views/scheduling/composables/useScheduleAutoSchedule.d.ts +301 -0
- package/dist/src/views/scheduling/composables/useScheduleBoard.d.ts +615 -0
- package/dist/src/views/scheduling/composables/useScheduleCellState.d.ts +27 -0
- package/dist/src/views/scheduling/composables/useScheduleClashDetection.d.ts +28 -0
- package/dist/src/views/scheduling/composables/useScheduleCloneOutletModal.d.ts +21 -0
- package/dist/src/views/scheduling/composables/useScheduleCoach.d.ts +80 -0
- package/dist/src/views/scheduling/composables/useScheduleCopyWeek.d.ts +12 -0
- package/dist/src/views/scheduling/composables/useScheduleCostRail.d.ts +60 -0
- package/dist/src/views/scheduling/composables/useScheduleDayNote.d.ts +44 -0
- package/dist/src/views/scheduling/composables/useScheduleDayTimeline.d.ts +111 -0
- package/dist/src/views/scheduling/composables/useScheduleDemand.d.ts +59 -0
- package/dist/src/views/scheduling/composables/useScheduleDemandRow.d.ts +47 -0
- package/dist/src/views/scheduling/composables/useScheduleDemandSheet.d.ts +166 -0
- package/dist/src/views/scheduling/composables/useScheduleDragDrop.d.ts +55 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeAccess.d.ts +24 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeAvailability.d.ts +13 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeCandidates.d.ts +49 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeCompensation.d.ts +7 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeForm.d.ts +22 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeIdentity.d.ts +50 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeMenu.d.ts +38 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeePersistence.d.ts +32 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeProfile.d.ts +16 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeValidation.d.ts +18 -0
- package/dist/src/views/scheduling/composables/useScheduleExport.d.ts +52 -0
- package/dist/src/views/scheduling/composables/useScheduleFilterBar.d.ts +14 -0
- package/dist/src/views/scheduling/composables/useScheduleGapPopover.d.ts +79 -0
- package/dist/src/views/scheduling/composables/useScheduleLeave.d.ts +60 -0
- package/dist/src/views/scheduling/composables/useScheduleLegend.d.ts +15 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingAvailability.d.ts +58 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingDemand.d.ts +45 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingEmployees.d.ts +231 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingFlow.d.ts +9 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingHours.d.ts +15 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingNavigation.d.ts +11 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingPersistence.d.ts +13 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +1543 -0
- package/dist/src/views/scheduling/composables/useScheduleOutlet.d.ts +25 -0
- package/dist/src/views/scheduling/composables/useSchedulePageActions.d.ts +18 -0
- package/dist/src/views/scheduling/composables/useSchedulePageBootstrap.d.ts +9 -0
- package/dist/src/views/scheduling/composables/useSchedulePageCellActions.d.ts +21 -0
- package/dist/src/views/scheduling/composables/useSchedulePageCellDrop.d.ts +20 -0
- package/dist/src/views/scheduling/composables/useSchedulePageClearActions.d.ts +33 -0
- package/dist/src/views/scheduling/composables/useSchedulePageEmployeeActions.d.ts +22 -0
- package/dist/src/views/scheduling/composables/useSchedulePageOverlays.d.ts +21 -0
- package/dist/src/views/scheduling/composables/useSchedulePdfExport.d.ts +19 -0
- package/dist/src/views/scheduling/composables/useSchedulePositionModal.d.ts +55 -0
- package/dist/src/views/scheduling/composables/useSchedulePositions.d.ts +35 -0
- package/dist/src/views/scheduling/composables/useSchedulePublish.d.ts +127 -0
- package/dist/src/views/scheduling/composables/useSchedulePublishPersistence.d.ts +11 -0
- package/dist/src/views/scheduling/composables/useScheduleRangeCalendar.d.ts +27 -0
- package/dist/src/views/scheduling/composables/useScheduleRoster.d.ts +313 -0
- package/dist/src/views/scheduling/composables/useScheduleSettings.d.ts +40 -0
- package/dist/src/views/scheduling/composables/useScheduleSetupBanner.d.ts +17 -0
- package/dist/src/views/scheduling/composables/useScheduleShiftActions.d.ts +245 -0
- package/dist/src/views/scheduling/composables/useScheduleShiftDraft.d.ts +63 -0
- package/dist/src/views/scheduling/composables/useScheduleShiftPersistence.d.ts +17 -0
- package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +255 -0
- package/dist/src/views/scheduling/composables/useScheduleStatsRow.d.ts +27 -0
- package/dist/src/views/scheduling/composables/useScheduleTimePicker.d.ts +49 -0
- package/dist/src/views/scheduling/composables/useScheduleTour.d.ts +95 -0
- package/dist/src/views/scheduling/composables/useScheduleViewportFit.d.ts +9 -0
- package/dist/src/views/scheduling/country-rules/index.d.ts +33 -0
- package/dist/src/views/scheduling/data.d.ts +123 -0
- package/dist/src/views/scheduling/locales/index.d.ts +6988 -0
- package/dist/src/views/scheduling/schedule-constants.d.ts +7 -0
- package/dist/src/views/scheduling/schedule-state.d.ts +767 -0
- package/dist/src/views/scheduling/schedule-store.d.ts +140 -0
- package/dist/src/views/scheduling/types.d.ts +381 -0
- package/dist/src/views/team/components/MemberGrantFields.vue.d.ts +2 -6
- package/dist/src/views/team/components/PortalConditionForm.vue.d.ts +2 -2
- package/dist/src/views/team/components/PosAssignmentRows.vue.d.ts +0 -2
- package/dist/src/views/team/condition-builders/ConditionBuilderForm.vue.d.ts +2 -2
- package/dist/src/views/team/member/AddMemberForm.vue.d.ts +0 -2
- package/dist/src/views/team/member/TeamMemberMasterUser.vue.d.ts +0 -2
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-CL6EEDuw.js → useAppStore-BPARQyvJ.js} +1 -1
- package/dist/useDiscardConfirm-CzZSPyvh.js +28 -0
- package/dist/{useLoading-BBjBUzGJ.js → useLoading-iPESFb6R.js} +1 -1
- package/dist/{useReportPermissions-Bg0fma6m.js → useReportPermissions-By-BoJZb.js} +5 -5
- package/package.json +5 -3
- package/dist/AuditLogList-Dd6HyFhk.js +0 -1777
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-DPT2FoIc.js +0 -45
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js +0 -49
- package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-B5QDOF0L.js +0 -1840
- package/dist/RoleList-ALmAwN0U.js +0 -739
- package/dist/SelectFilter-ATOm0hdn.js +0 -269
- package/dist/TeamMemberList-DZfEnOs1.js +0 -2097
- package/dist/restaurant-CKhT6kgj.js +0 -45
- package/dist/useDiscardConfirm-DPhEV6v0.js +0 -157
|
@@ -1,1777 +0,0 @@
|
|
|
1
|
-
import { defineComponent as Mt, ref as S, computed as A, onMounted as Ao, onBeforeUnmount as Fo, watch as de, resolveComponent as N, createElementBlock as b, openBlock as v, createBlock as we, createCommentVNode as j, createElementVNode as a, Fragment as q, renderList as ae, withCtx as B, createVNode as m, toDisplayString as l, unref as c, nextTick as Mo, onUnmounted as Oo, createTextVNode as Ve, normalizeClass as Do } from "vue";
|
|
2
|
-
import { d as D } from "./dayjs.min-BO8bcI17.js";
|
|
3
|
-
import { useI18n as Ot, useCoreStore as jo } from "@feedmepos/mf-common";
|
|
4
|
-
import { g as Ze, b as et, B as St, _ as Co } from "./app-CdrnR_Pw.js";
|
|
5
|
-
import { components as ue } from "@feedmepos/ui-library";
|
|
6
|
-
import { S as Pe, _ as To } from "./SelectFilter-ATOm0hdn.js";
|
|
7
|
-
import { _ as Vo } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
|
|
8
|
-
import { _ as Po } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
|
|
9
|
-
import { t as Eo, p as kt } from "./rule-BlMymDXm.js";
|
|
10
|
-
import { defineStore as $o } from "pinia";
|
|
11
|
-
import { u as No } from "./useDebounce-B8ZPVS5C.js";
|
|
12
|
-
import { n as Uo } from "./string-DZQ1uNjn.js";
|
|
13
|
-
const Se = [
|
|
14
|
-
{ key: "all", label: "All", subjectPrefixes: [] },
|
|
15
|
-
{ key: "inventory", label: "Inventory", subjectPrefixes: ["business::inventory", "inventory"] },
|
|
16
|
-
{ key: "report", label: "Report", subjectPrefixes: ["business::report", "report"] },
|
|
17
|
-
{ key: "hrm", label: "HRM", subjectPrefixes: ["business::hrm", "hrm"] },
|
|
18
|
-
{ key: "payment", label: "Payment", subjectPrefixes: ["business::payment", "payment"] },
|
|
19
|
-
{ key: "menu", label: "Menu", subjectPrefixes: ["business::menu", "menu"] },
|
|
20
|
-
{ key: "crm", label: "CRM", subjectPrefixes: ["business::crm", "crm"] }
|
|
21
|
-
// Add more as modules are revamped with new actionguard:
|
|
22
|
-
// { key: 'restaurantOperation', label: 'Restaurant Operation', subjectPrefixes: ['restaurant'] },
|
|
23
|
-
], tt = "/audit-logs", Ee = {
|
|
24
|
-
async count(t) {
|
|
25
|
-
var r, d, g, p, h, i, C;
|
|
26
|
-
const o = {
|
|
27
|
-
...t != null && t.from ? { from: t.from } : {},
|
|
28
|
-
...t != null && t.to ? { to: t.to } : {},
|
|
29
|
-
...(r = t == null ? void 0 : t.userIds) != null && r.length ? { userIds: t.userIds } : {},
|
|
30
|
-
...(d = t == null ? void 0 : t.subjects) != null && d.length ? { subjects: t.subjects } : {},
|
|
31
|
-
...(g = t == null ? void 0 : t.subjectPrefixes) != null && g.length ? { subjectPrefixes: t.subjectPrefixes } : {},
|
|
32
|
-
...(p = t == null ? void 0 : t.actions) != null && p.length ? { actions: t.actions } : {},
|
|
33
|
-
...(h = t == null ? void 0 : t.outcomes) != null && h.length ? { outcomes: t.outcomes } : {},
|
|
34
|
-
...t != null && t.feedmeAdminActors ? { feedmeAdminActors: !0 } : {},
|
|
35
|
-
...t != null && t.search ? { search: t.search } : {},
|
|
36
|
-
...(i = t == null ? void 0 : t.searchUserIds) != null && i.length ? { searchUserIds: t.searchUserIds } : {},
|
|
37
|
-
...(C = t == null ? void 0 : t.searchSubjects) != null && C.length ? { searchSubjects: t.searchSubjects } : {}
|
|
38
|
-
};
|
|
39
|
-
return (await Ze(
|
|
40
|
-
await et().get(`${tt}/count`, {
|
|
41
|
-
params: o,
|
|
42
|
-
paramsSerializer: (O) => {
|
|
43
|
-
const k = new URLSearchParams();
|
|
44
|
-
for (const [V, L] of Object.entries(O))
|
|
45
|
-
if (Array.isArray(L))
|
|
46
|
-
for (const I of L) k.append(V, String(I));
|
|
47
|
-
else L != null && k.append(V, String(L));
|
|
48
|
-
return k.toString();
|
|
49
|
-
}
|
|
50
|
-
})
|
|
51
|
-
)).total;
|
|
52
|
-
},
|
|
53
|
-
async read(t) {
|
|
54
|
-
var n, r, d, g, p, h, i;
|
|
55
|
-
const o = {
|
|
56
|
-
limit: (t == null ? void 0 : t.limit) ?? 100,
|
|
57
|
-
offset: (t == null ? void 0 : t.offset) ?? 0,
|
|
58
|
-
...t != null && t.from ? { from: t.from } : {},
|
|
59
|
-
...t != null && t.to ? { to: t.to } : {},
|
|
60
|
-
...(n = t == null ? void 0 : t.userIds) != null && n.length ? { userIds: t.userIds } : {},
|
|
61
|
-
...t != null && t.feedmeAdminActors ? { feedmeAdminActors: !0 } : {},
|
|
62
|
-
...(r = t == null ? void 0 : t.subjects) != null && r.length ? { subjects: t.subjects } : {},
|
|
63
|
-
...(d = t == null ? void 0 : t.subjectPrefixes) != null && d.length ? { subjectPrefixes: t.subjectPrefixes } : {},
|
|
64
|
-
...(g = t == null ? void 0 : t.actions) != null && g.length ? { actions: t.actions } : {},
|
|
65
|
-
...(p = t == null ? void 0 : t.outcomes) != null && p.length ? { outcomes: t.outcomes } : {},
|
|
66
|
-
...t != null && t.search ? { search: t.search } : {},
|
|
67
|
-
...(h = t == null ? void 0 : t.searchUserIds) != null && h.length ? { searchUserIds: t.searchUserIds } : {},
|
|
68
|
-
...(i = t == null ? void 0 : t.searchSubjects) != null && i.length ? { searchSubjects: t.searchSubjects } : {}
|
|
69
|
-
};
|
|
70
|
-
return Ze(
|
|
71
|
-
await et().get(tt, {
|
|
72
|
-
params: o,
|
|
73
|
-
// Serialize arrays as repeated params: key=val1&key=val2
|
|
74
|
-
// (NestJS @Query expects this; axios default adds brackets which break matching)
|
|
75
|
-
paramsSerializer: (C) => {
|
|
76
|
-
const O = new URLSearchParams();
|
|
77
|
-
for (const [k, V] of Object.entries(C))
|
|
78
|
-
if (Array.isArray(V))
|
|
79
|
-
for (const L of V) O.append(k, String(L));
|
|
80
|
-
else V != null && O.append(k, String(V));
|
|
81
|
-
return O.toString();
|
|
82
|
-
}
|
|
83
|
-
})
|
|
84
|
-
);
|
|
85
|
-
},
|
|
86
|
-
/**
|
|
87
|
-
* FeedMe-admin options for the User filter. `actors` is the named admin list (internal
|
|
88
|
-
* viewers only; empty for merchants). `showFeedmeAdminFilter` indicates whether to offer
|
|
89
|
-
* the "FeedMe Admin" catch-all (only when the business has relevant admin activity).
|
|
90
|
-
*/
|
|
91
|
-
async getFeedmeAdminFilter(t) {
|
|
92
|
-
const o = {
|
|
93
|
-
...t != null && t.from ? { from: t.from } : {},
|
|
94
|
-
...t != null && t.to ? { to: t.to } : {}
|
|
95
|
-
};
|
|
96
|
-
return Ze(
|
|
97
|
-
await et().get(`${tt}/actors`, { params: o })
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
}, Ro = { class: "flex h-[46px] items-center gap-8 rounded-sm px-16 hover:bg-fm-color-opacity-sm" }, Ko = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Bo = {
|
|
101
|
-
"data-more-measure": "",
|
|
102
|
-
class: "flex h-[46px] items-center gap-8 rounded-sm px-16"
|
|
103
|
-
}, Yo = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, zo = /* @__PURE__ */ Mt({
|
|
104
|
-
__name: "AuditLogModuleTabs",
|
|
105
|
-
props: {
|
|
106
|
-
modelValue: {},
|
|
107
|
-
items: {}
|
|
108
|
-
},
|
|
109
|
-
emits: ["update:modelValue"],
|
|
110
|
-
setup(t, { emit: o }) {
|
|
111
|
-
const n = t, r = o, { t: d } = Ot(), g = S(!1), p = S(null), h = S(null), i = S([]), C = S(0), O = S(0);
|
|
112
|
-
let k = null;
|
|
113
|
-
async function V() {
|
|
114
|
-
if (await Mo(), !h.value) return;
|
|
115
|
-
const _ = h.value.querySelectorAll("[data-tab-measure]");
|
|
116
|
-
i.value = Array.from(_).map((E) => E.offsetWidth);
|
|
117
|
-
const M = h.value.querySelector("[data-more-measure]");
|
|
118
|
-
C.value = (M == null ? void 0 : M.offsetWidth) ?? 0;
|
|
119
|
-
}
|
|
120
|
-
const L = A(() => {
|
|
121
|
-
const _ = n.items.length;
|
|
122
|
-
if (_ === 0) return 0;
|
|
123
|
-
if (!O.value || i.value.length !== _) return _;
|
|
124
|
-
const M = i.value;
|
|
125
|
-
if (M.reduce((w, ce) => w + ce, 0) <= O.value) return _;
|
|
126
|
-
const T = C.value;
|
|
127
|
-
let Y = 0, U = 0;
|
|
128
|
-
for (let w = 0; w < _ && !(Y + M[w] + T > O.value); w++)
|
|
129
|
-
Y += M[w], U++;
|
|
130
|
-
return U;
|
|
131
|
-
}), I = A(() => {
|
|
132
|
-
const _ = L.value, M = n.items.length;
|
|
133
|
-
if (_ >= M) return [...n.items];
|
|
134
|
-
const E = n.items.slice(0, _), T = n.items.find((J) => J.value === n.modelValue);
|
|
135
|
-
if (!T || E.some((J) => J.value === T.value)) return E;
|
|
136
|
-
if (_ === 0) return [T];
|
|
137
|
-
const Y = n.items.findIndex((J) => J.value === T.value), U = i.value, w = C.value, ce = U[Y] ?? 0;
|
|
138
|
-
let ne = _, Ae = U.slice(0, ne - 1).reduce((J, he) => J + he, 0);
|
|
139
|
-
for (; ne > 1 && Ae + ce + w > O.value; )
|
|
140
|
-
ne--, Ae = U.slice(0, ne - 1).reduce((J, he) => J + he, 0);
|
|
141
|
-
return [...n.items.slice(0, Math.max(ne - 1, 0)), T];
|
|
142
|
-
}), K = A(() => {
|
|
143
|
-
const _ = new Set(I.value.map((M) => M.value));
|
|
144
|
-
return n.items.filter((M) => !_.has(M.value));
|
|
145
|
-
});
|
|
146
|
-
function W(_) {
|
|
147
|
-
g.value = !1, r("update:modelValue", _);
|
|
148
|
-
}
|
|
149
|
-
return Ao(async () => {
|
|
150
|
-
await V(), p.value && (O.value = p.value.clientWidth, k = new ResizeObserver(() => {
|
|
151
|
-
p.value && (O.value = p.value.clientWidth);
|
|
152
|
-
}), k.observe(p.value));
|
|
153
|
-
}), Fo(() => {
|
|
154
|
-
k == null || k.disconnect(), k = null;
|
|
155
|
-
}), de(
|
|
156
|
-
() => n.items,
|
|
157
|
-
() => {
|
|
158
|
-
V();
|
|
159
|
-
},
|
|
160
|
-
{ deep: !0 }
|
|
161
|
-
), (_, M) => {
|
|
162
|
-
const E = N("FmTab"), T = N("FmIcon"), Y = N("FmMenuItem"), U = N("FmMenu");
|
|
163
|
-
return v(), b("div", {
|
|
164
|
-
ref_key: "containerRef",
|
|
165
|
-
ref: p,
|
|
166
|
-
class: "relative flex w-full flex-row items-center"
|
|
167
|
-
}, [
|
|
168
|
-
(v(!0), b(q, null, ae(I.value, (w) => (v(), we(E, {
|
|
169
|
-
key: w.value,
|
|
170
|
-
"model-value": t.modelValue,
|
|
171
|
-
label: w.label,
|
|
172
|
-
badge: w.badge,
|
|
173
|
-
disabled: w.disabled,
|
|
174
|
-
value: w.value,
|
|
175
|
-
"onUpdate:modelValue": W
|
|
176
|
-
}, null, 8, ["model-value", "label", "badge", "disabled", "value"]))), 128)),
|
|
177
|
-
K.value.length > 0 ? (v(), we(U, {
|
|
178
|
-
key: 0,
|
|
179
|
-
"show-menu": g.value,
|
|
180
|
-
class: "max-w-[360px] min-w-[90px] rounded-sm",
|
|
181
|
-
placement: "bottom-start",
|
|
182
|
-
onMenuChanged: M[0] || (M[0] = (w) => g.value = w)
|
|
183
|
-
}, {
|
|
184
|
-
"menu-button": B(() => [
|
|
185
|
-
a("div", Ro, [
|
|
186
|
-
m(T, { name: "more_vert" }),
|
|
187
|
-
a("span", Ko, l(c(d)("auditLog.modules.more")), 1)
|
|
188
|
-
])
|
|
189
|
-
]),
|
|
190
|
-
default: B(() => [
|
|
191
|
-
(v(!0), b(q, null, ae(K.value, (w) => (v(), we(Y, {
|
|
192
|
-
key: w.value,
|
|
193
|
-
"model-value": t.modelValue === w.value,
|
|
194
|
-
label: w.label,
|
|
195
|
-
disabled: w.disabled,
|
|
196
|
-
onClick: (ce) => W(w.value)
|
|
197
|
-
}, null, 8, ["model-value", "label", "disabled", "onClick"]))), 128))
|
|
198
|
-
]),
|
|
199
|
-
_: 1
|
|
200
|
-
}, 8, ["show-menu"])) : j("", !0),
|
|
201
|
-
a("div", {
|
|
202
|
-
ref_key: "measurerRef",
|
|
203
|
-
ref: h,
|
|
204
|
-
"aria-hidden": "true",
|
|
205
|
-
class: "pointer-events-none invisible absolute -left-[9999px] -top-[9999px] flex flex-row items-center"
|
|
206
|
-
}, [
|
|
207
|
-
(v(!0), b(q, null, ae(t.items, (w) => (v(), b("div", {
|
|
208
|
-
key: `measure-${w.value}`,
|
|
209
|
-
"data-tab-measure": ""
|
|
210
|
-
}, [
|
|
211
|
-
m(E, {
|
|
212
|
-
"model-value": t.modelValue,
|
|
213
|
-
label: w.label,
|
|
214
|
-
badge: w.badge,
|
|
215
|
-
disabled: w.disabled,
|
|
216
|
-
value: w.value
|
|
217
|
-
}, null, 8, ["model-value", "label", "badge", "disabled", "value"])
|
|
218
|
-
]))), 128)),
|
|
219
|
-
a("div", Bo, [
|
|
220
|
-
m(T, { name: "more_vert" }),
|
|
221
|
-
a("span", Yo, l(c(d)("auditLog.modules.more")), 1)
|
|
222
|
-
])
|
|
223
|
-
], 512)
|
|
224
|
-
], 512);
|
|
225
|
-
};
|
|
226
|
-
}
|
|
227
|
-
}), qo = $o("team", () => {
|
|
228
|
-
const t = S([]), o = S(!1), n = S(!1), r = A(
|
|
229
|
-
() => Object.fromEntries(t.value.map((h) => [h.doc.userId, h.name]))
|
|
230
|
-
), d = A(
|
|
231
|
-
() => Object.fromEntries(t.value.map((h) => [h.doc.userId, h.email]))
|
|
232
|
-
), g = A(
|
|
233
|
-
() => Object.fromEntries(t.value.map((h) => [h.doc.userId, h.phoneNumber]))
|
|
234
|
-
);
|
|
235
|
-
async function p({ force: h = !1 } = {}) {
|
|
236
|
-
if (!(!h && t.value.length > 0))
|
|
237
|
-
try {
|
|
238
|
-
o.value = !0;
|
|
239
|
-
const i = await Eo.readTeamMembers();
|
|
240
|
-
t.value = i.sort((C, O) => C.doc.isOwner ? -1 : C.name.localeCompare(O.name)), n.value = !0;
|
|
241
|
-
} finally {
|
|
242
|
-
o.value = !1;
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
return {
|
|
246
|
-
members: t,
|
|
247
|
-
isLoading: o,
|
|
248
|
-
hasLoaded: n,
|
|
249
|
-
userIdToName: r,
|
|
250
|
-
userIdToEmail: d,
|
|
251
|
-
userIdToPhone: g,
|
|
252
|
-
readTeamMembers: p
|
|
253
|
-
};
|
|
254
|
-
});
|
|
255
|
-
function Jo(t) {
|
|
256
|
-
const o = t.indexOf(".");
|
|
257
|
-
return o <= 0 || o === t.length - 1 ? null : { entity: t.slice(0, o), verb: t.slice(o + 1) };
|
|
258
|
-
}
|
|
259
|
-
function wt(t) {
|
|
260
|
-
const o = t.split("-").join(" ");
|
|
261
|
-
return o.charAt(0).toUpperCase() + o.slice(1);
|
|
262
|
-
}
|
|
263
|
-
function Ho(t, o, n) {
|
|
264
|
-
const r = t(o, n);
|
|
265
|
-
return r === o ? null : r;
|
|
266
|
-
}
|
|
267
|
-
function st(t, o) {
|
|
268
|
-
const { eventKey: n, params: r, operationLabel: d } = o;
|
|
269
|
-
if (n) {
|
|
270
|
-
const g = Ho(t, `auditLog.event.sentence.${n}`, r);
|
|
271
|
-
if (g) return g;
|
|
272
|
-
const p = Jo(n);
|
|
273
|
-
if (p) {
|
|
274
|
-
const h = `${wt(p.verb)} ${wt(p.entity)}`, i = (r == null ? void 0 : r.label) ?? (r == null ? void 0 : r.name);
|
|
275
|
-
return i !== void 0 && i !== "" ? `${h} — ${i}` : h;
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
return d ?? "";
|
|
279
|
-
}
|
|
280
|
-
function ge(t) {
|
|
281
|
-
return typeof t == "object" && t !== null && !Array.isArray(t);
|
|
282
|
-
}
|
|
283
|
-
function Ie(t) {
|
|
284
|
-
return Array.isArray(t);
|
|
285
|
-
}
|
|
286
|
-
function Ne(t) {
|
|
287
|
-
if (t === null) return "null";
|
|
288
|
-
if (typeof t == "object")
|
|
289
|
-
try {
|
|
290
|
-
return JSON.stringify(t);
|
|
291
|
-
} catch {
|
|
292
|
-
return String(t);
|
|
293
|
-
}
|
|
294
|
-
return String(t);
|
|
295
|
-
}
|
|
296
|
-
function Wo(t, o) {
|
|
297
|
-
return t ? `${t}.${o}` : o;
|
|
298
|
-
}
|
|
299
|
-
function It(t) {
|
|
300
|
-
if (typeof t != "string") return { ok: !1, value: void 0 };
|
|
301
|
-
const o = t.trim();
|
|
302
|
-
if (!o.startsWith("{") && !o.startsWith("[")) return { ok: !1, value: void 0 };
|
|
303
|
-
try {
|
|
304
|
-
const n = JSON.parse(o);
|
|
305
|
-
return ge(n) || Ie(n) ? { ok: !0, value: n } : { ok: !1, value: void 0 };
|
|
306
|
-
} catch {
|
|
307
|
-
return { ok: !1, value: void 0 };
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
const Go = ["_id", "id", "subject", "key", "name"];
|
|
311
|
-
function Xo(t, o) {
|
|
312
|
-
if (t.length === 0 || o.length === 0) return null;
|
|
313
|
-
const n = (d, g) => d.every((p) => ge(p) && p[g] !== void 0), r = (d, g) => {
|
|
314
|
-
const p = d.map((h) => h[g]);
|
|
315
|
-
return p.length === new Set(p).size;
|
|
316
|
-
};
|
|
317
|
-
for (const d of Go)
|
|
318
|
-
if (n(t, d) && n(o, d) && r(t, d) && r(o, d))
|
|
319
|
-
return d;
|
|
320
|
-
return null;
|
|
321
|
-
}
|
|
322
|
-
function Dt(t, o, n) {
|
|
323
|
-
n.push({ path: t, type: "added", before: null, after: Ne(o) });
|
|
324
|
-
}
|
|
325
|
-
function jt(t, o, n) {
|
|
326
|
-
n.push({ path: t, type: "removed", before: Ne(o), after: null });
|
|
327
|
-
}
|
|
328
|
-
function Qo(t, o, n, r) {
|
|
329
|
-
const d = /* @__PURE__ */ new Set([...Object.keys(o), ...Object.keys(n)]);
|
|
330
|
-
for (const g of Array.from(d)) {
|
|
331
|
-
const p = Object.prototype.hasOwnProperty.call(o, g), h = Object.prototype.hasOwnProperty.call(n, g);
|
|
332
|
-
Ue(Wo(t, g), o[g], p, n[g], h, r);
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
function Zo(t, o, n, r) {
|
|
336
|
-
const d = Xo(o, n);
|
|
337
|
-
if (d) {
|
|
338
|
-
const L = new Map(
|
|
339
|
-
o.map((_) => [_[d], _])
|
|
340
|
-
), I = new Map(
|
|
341
|
-
n.map((_) => [_[d], _])
|
|
342
|
-
), K = Array.from(L.keys()).concat(Array.from(I.keys())), W = Array.from(new Set(K));
|
|
343
|
-
for (const _ of W) {
|
|
344
|
-
const M = L.has(_), E = I.has(_), T = `${t}[${String(_)}]`;
|
|
345
|
-
Ue(
|
|
346
|
-
T,
|
|
347
|
-
L.get(_),
|
|
348
|
-
M,
|
|
349
|
-
I.get(_),
|
|
350
|
-
E,
|
|
351
|
-
r
|
|
352
|
-
);
|
|
353
|
-
}
|
|
354
|
-
return;
|
|
355
|
-
}
|
|
356
|
-
const g = o.map((L, I) => ({ sig: JSON.stringify(L), idx: I, item: L })), p = n.map((L, I) => ({ sig: JSON.stringify(L), idx: I, item: L })), h = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
|
|
357
|
-
for (const L of g)
|
|
358
|
-
h.has(L.sig) || h.set(L.sig, []), h.get(L.sig).push(L);
|
|
359
|
-
for (const L of p)
|
|
360
|
-
i.has(L.sig) || i.set(L.sig, []), i.get(L.sig).push(L);
|
|
361
|
-
const C = [], O = [], k = Array.from(h.keys()).concat(Array.from(i.keys())), V = Array.from(new Set(k));
|
|
362
|
-
for (const L of V) {
|
|
363
|
-
const I = h.get(L) || [], K = i.get(L) || [], W = Math.min(I.length, K.length);
|
|
364
|
-
for (let _ = W; _ < I.length; _++)
|
|
365
|
-
C.push({ idx: I[_].idx, item: I[_].item });
|
|
366
|
-
for (let _ = W; _ < K.length; _++)
|
|
367
|
-
O.push({ idx: K[_].idx, item: K[_].item });
|
|
368
|
-
}
|
|
369
|
-
for (const { idx: L, item: I } of C)
|
|
370
|
-
jt(`${t}[${L}]`, I, r);
|
|
371
|
-
for (const { idx: L, item: I } of O)
|
|
372
|
-
Dt(`${t}[${L}]`, I, r);
|
|
373
|
-
}
|
|
374
|
-
function Ue(t, o, n, r, d, g) {
|
|
375
|
-
if (!n && !d) return;
|
|
376
|
-
if (n && !d) {
|
|
377
|
-
jt(t, o, g);
|
|
378
|
-
return;
|
|
379
|
-
}
|
|
380
|
-
if (!n && d) {
|
|
381
|
-
Dt(t, r, g);
|
|
382
|
-
return;
|
|
383
|
-
}
|
|
384
|
-
if (JSON.stringify(o) === JSON.stringify(r)) return;
|
|
385
|
-
if (ge(o) && ge(r)) {
|
|
386
|
-
Qo(t, o, r, g);
|
|
387
|
-
return;
|
|
388
|
-
}
|
|
389
|
-
if (Ie(o) && Ie(r)) {
|
|
390
|
-
Zo(t, o, r, g);
|
|
391
|
-
return;
|
|
392
|
-
}
|
|
393
|
-
const p = It(o), h = It(r);
|
|
394
|
-
if (p.ok && h.ok) {
|
|
395
|
-
Ue(t, p.value, !0, h.value, !0, g);
|
|
396
|
-
return;
|
|
397
|
-
}
|
|
398
|
-
g.push({
|
|
399
|
-
path: t,
|
|
400
|
-
type: "changed",
|
|
401
|
-
before: Ne(o),
|
|
402
|
-
after: Ne(r)
|
|
403
|
-
});
|
|
404
|
-
}
|
|
405
|
-
function es(t, o) {
|
|
406
|
-
if (JSON.stringify(t) === JSON.stringify(o)) return [];
|
|
407
|
-
const n = t == null, r = o == null;
|
|
408
|
-
let d = t;
|
|
409
|
-
n && (ge(o) ? d = {} : Ie(o) && (d = []));
|
|
410
|
-
let g = o;
|
|
411
|
-
r && (ge(t) ? g = {} : Ie(t) && (g = []));
|
|
412
|
-
const p = [];
|
|
413
|
-
return Ue("", d, !0, g, !0, p), p;
|
|
414
|
-
}
|
|
415
|
-
function At(t) {
|
|
416
|
-
const o = t.operations;
|
|
417
|
-
return !o || o.length === 0 ? !1 : o.some((n) => n.status === "failed");
|
|
418
|
-
}
|
|
419
|
-
function pe(t) {
|
|
420
|
-
return t === void 0 ? "—" : Array.isArray(t) ? t.length > 0 ? t.join(", ") : "—" : t || "—";
|
|
421
|
-
}
|
|
422
|
-
function ts(t) {
|
|
423
|
-
return {
|
|
424
|
-
label: t.label,
|
|
425
|
-
labelKey: t.labelKey,
|
|
426
|
-
type: t.type,
|
|
427
|
-
beforeDisplay: pe(t.before),
|
|
428
|
-
afterDisplay: pe(t.after)
|
|
429
|
-
};
|
|
430
|
-
}
|
|
431
|
-
function os(t) {
|
|
432
|
-
return Array.isArray(t) && t.length > 0;
|
|
433
|
-
}
|
|
434
|
-
function Ct(t, o, n) {
|
|
435
|
-
return n.labelKey && o(n.labelKey) ? t(n.labelKey) : n.label;
|
|
436
|
-
}
|
|
437
|
-
function Tt(t, o) {
|
|
438
|
-
return st(t, o) || t("auditLog.operation.unlabeled");
|
|
439
|
-
}
|
|
440
|
-
function ss(t, o) {
|
|
441
|
-
return !o || o.length === 0 ? "" : o.map((n) => {
|
|
442
|
-
const r = Tt(t, n), d = t(`auditLog.outcome.${n.status}`);
|
|
443
|
-
let g = `${r}: ${d}`;
|
|
444
|
-
return n.status === "failed" && n.errorMessage && (g += ` — ${n.errorMessage}`), g;
|
|
445
|
-
}).join(`
|
|
446
|
-
`);
|
|
447
|
-
}
|
|
448
|
-
function as(t, o, n) {
|
|
449
|
-
const r = Ct(t, o, n);
|
|
450
|
-
return n.type === "add" ? `${r}: + ${pe(n.after)}` : n.type === "remove" ? `${r}: - ${pe(n.before)}` : `${r}: ${pe(n.before)} → ${pe(n.after)}`;
|
|
451
|
-
}
|
|
452
|
-
function ns(t, o, n) {
|
|
453
|
-
if (!n || n.length === 0) return "";
|
|
454
|
-
const r = n.filter((p) => p.changeNodes && p.changeNodes.length > 0);
|
|
455
|
-
if (r.length === 0) return "";
|
|
456
|
-
const d = r.length > 1;
|
|
457
|
-
return r.map((p) => {
|
|
458
|
-
const h = (p.changeNodes ?? []).map((i) => as(t, o, i));
|
|
459
|
-
return d ? [`[${Tt(t, p)}]`, ...h].join(`
|
|
460
|
-
`) : h.join(`
|
|
461
|
-
`);
|
|
462
|
-
}).join(`
|
|
463
|
-
`);
|
|
464
|
-
}
|
|
465
|
-
const ls = {
|
|
466
|
-
class: "flex flex-col gap-4 p-12 w-[260px]"
|
|
467
|
-
}, rs = {
|
|
468
|
-
class: "text-xs font-semibold text-fm-color-typo-secondary mb-4"
|
|
469
|
-
}, is = {
|
|
470
|
-
class: "flex min-h-0 flex-1 flex-col gap-16"
|
|
471
|
-
}, us = {
|
|
472
|
-
class: "space-y-16"
|
|
473
|
-
}, ds = {
|
|
474
|
-
class: "flex flex-wrap items-center gap-8"
|
|
475
|
-
}, cs = {
|
|
476
|
-
class: "w-fit"
|
|
477
|
-
}, fs = {
|
|
478
|
-
class: "w-fit"
|
|
479
|
-
}, ms = {
|
|
480
|
-
class: "w-fit"
|
|
481
|
-
}, vs = {
|
|
482
|
-
class: "w-fit"
|
|
483
|
-
}, ps = {
|
|
484
|
-
class: "flex h-full flex-col overflow-auto"
|
|
485
|
-
}, gs = {
|
|
486
|
-
key: 0,
|
|
487
|
-
class: "space-y-12 p-4 text-sm"
|
|
488
|
-
}, hs = {
|
|
489
|
-
class: "flex items-start justify-between gap-8 rounded-lg border border-fm-color-border-default p-12"
|
|
490
|
-
}, ys = {
|
|
491
|
-
class: "min-w-0 flex-1"
|
|
492
|
-
}, bs = {
|
|
493
|
-
class: "audit-log-operation-label-detail text-base font-bold leading-snug text-fm-color-typo-primary"
|
|
494
|
-
}, _s = {
|
|
495
|
-
key: 0,
|
|
496
|
-
class: "mt-4 break-all font-mono text-xs text-fm-color-typo-secondary"
|
|
497
|
-
}, xs = {
|
|
498
|
-
class: "flex items-center gap-4"
|
|
499
|
-
}, Ls = {
|
|
500
|
-
class: "rounded-lg border border-fm-color-border-default p-12"
|
|
501
|
-
}, Ss = {
|
|
502
|
-
class: "space-y-12"
|
|
503
|
-
}, ks = {
|
|
504
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
505
|
-
}, ws = {
|
|
506
|
-
class: "font-semibold"
|
|
507
|
-
}, Is = {
|
|
508
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
509
|
-
}, As = {
|
|
510
|
-
class: "font-semibold"
|
|
511
|
-
}, Fs = {
|
|
512
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
513
|
-
}, Ms = {
|
|
514
|
-
class: "break-all font-semibold"
|
|
515
|
-
}, Os = {
|
|
516
|
-
key: 0
|
|
517
|
-
}, Ds = {
|
|
518
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
519
|
-
}, js = {
|
|
520
|
-
class: "break-all font-mono text-xs font-semibold"
|
|
521
|
-
}, Cs = {
|
|
522
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
523
|
-
}, Ts = {
|
|
524
|
-
class: "break-all font-mono text-xs font-semibold"
|
|
525
|
-
}, Vs = {
|
|
526
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
527
|
-
}, Ps = {
|
|
528
|
-
class: "font-semibold"
|
|
529
|
-
}, Es = {
|
|
530
|
-
class: "rounded-lg border border-fm-color-border-default"
|
|
531
|
-
}, $s = {
|
|
532
|
-
class: "p-12"
|
|
533
|
-
}, Ns = {
|
|
534
|
-
class: "text-base font-bold text-fm-color-typo-primary"
|
|
535
|
-
}, Us = {
|
|
536
|
-
class: "space-y-12 p-12"
|
|
537
|
-
}, Rs = {
|
|
538
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
539
|
-
}, Ks = {
|
|
540
|
-
class: "font-semibold"
|
|
541
|
-
}, Bs = {
|
|
542
|
-
class: "rounded-lg border border-fm-color-border-default"
|
|
543
|
-
}, Ys = {
|
|
544
|
-
class: "p-12"
|
|
545
|
-
}, zs = {
|
|
546
|
-
class: "text-base font-bold text-fm-color-typo-primary"
|
|
547
|
-
}, qs = {
|
|
548
|
-
class: "space-y-12 p-12"
|
|
549
|
-
}, Js = {
|
|
550
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
551
|
-
}, Hs = {
|
|
552
|
-
class: "font-semibold"
|
|
553
|
-
}, Ws = {
|
|
554
|
-
key: 0
|
|
555
|
-
}, Gs = {
|
|
556
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
557
|
-
}, Xs = {
|
|
558
|
-
key: 0,
|
|
559
|
-
class: "font-semibold"
|
|
560
|
-
}, Qs = {
|
|
561
|
-
key: 1,
|
|
562
|
-
class: "break-all font-mono text-xs text-fm-color-typo-secondary"
|
|
563
|
-
}, Zs = {
|
|
564
|
-
key: 1
|
|
565
|
-
}, ea = {
|
|
566
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
567
|
-
}, ta = {
|
|
568
|
-
class: "font-semibold whitespace-pre-line"
|
|
569
|
-
}, oa = {
|
|
570
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
571
|
-
}, sa = {
|
|
572
|
-
class: "font-semibold"
|
|
573
|
-
}, aa = {
|
|
574
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
575
|
-
}, na = {
|
|
576
|
-
class: "break-all font-mono text-xs font-semibold"
|
|
577
|
-
}, la = {
|
|
578
|
-
key: 2
|
|
579
|
-
}, ra = {
|
|
580
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
581
|
-
}, ia = {
|
|
582
|
-
class: "mt-4 space-y-4"
|
|
583
|
-
}, ua = {
|
|
584
|
-
class: "flex h-16 w-16 shrink-0 items-center justify-center rounded-full bg-fm-color-primary-default text-xs font-bold text-white"
|
|
585
|
-
}, da = {
|
|
586
|
-
class: "text-xs font-semibold"
|
|
587
|
-
}, ca = {
|
|
588
|
-
key: 0,
|
|
589
|
-
class: "text-fm-color-typo-secondary"
|
|
590
|
-
}, fa = {
|
|
591
|
-
key: 3
|
|
592
|
-
}, ma = {
|
|
593
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
594
|
-
}, va = {
|
|
595
|
-
class: "mt-4 max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner whitespace-pre-wrap break-all"
|
|
596
|
-
}, pa = {
|
|
597
|
-
key: 0,
|
|
598
|
-
class: "space-y-12 p-4 text-sm"
|
|
599
|
-
}, ga = {
|
|
600
|
-
class: "flex items-start justify-between gap-8 rounded-lg border border-fm-color-border-default p-12"
|
|
601
|
-
}, ha = {
|
|
602
|
-
class: "min-w-0 flex-1"
|
|
603
|
-
}, ya = {
|
|
604
|
-
class: "text-base font-bold leading-snug text-fm-color-typo-primary"
|
|
605
|
-
}, ba = {
|
|
606
|
-
key: 0,
|
|
607
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
608
|
-
}, _a = {
|
|
609
|
-
class: "rounded-lg border border-fm-color-border-default p-12"
|
|
610
|
-
}, xa = {
|
|
611
|
-
class: "space-y-12"
|
|
612
|
-
}, La = {
|
|
613
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
614
|
-
}, Sa = {
|
|
615
|
-
class: "font-semibold"
|
|
616
|
-
}, ka = {
|
|
617
|
-
key: 0
|
|
618
|
-
}, wa = {
|
|
619
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
620
|
-
}, Ia = {
|
|
621
|
-
class: "font-semibold"
|
|
622
|
-
}, Aa = {
|
|
623
|
-
key: 1
|
|
624
|
-
}, Fa = {
|
|
625
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
626
|
-
}, Ma = {
|
|
627
|
-
class: "font-semibold"
|
|
628
|
-
}, Oa = {
|
|
629
|
-
key: 0,
|
|
630
|
-
class: "rounded-lg border border-fm-color-border-default p-12"
|
|
631
|
-
}, Da = {
|
|
632
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
633
|
-
}, ja = {
|
|
634
|
-
class: "whitespace-pre-line font-semibold text-fm-color-typo-error"
|
|
635
|
-
}, Ca = {
|
|
636
|
-
class: "rounded-lg border border-fm-color-border-default"
|
|
637
|
-
}, Ta = {
|
|
638
|
-
class: "p-12"
|
|
639
|
-
}, Va = {
|
|
640
|
-
class: "text-base font-bold text-fm-color-typo-primary"
|
|
641
|
-
}, Pa = {
|
|
642
|
-
class: "p-12"
|
|
643
|
-
}, Ea = {
|
|
644
|
-
key: 0,
|
|
645
|
-
class: "divide-y divide-fm-color-border-default"
|
|
646
|
-
}, $a = {
|
|
647
|
-
class: "flex flex-wrap items-center gap-8"
|
|
648
|
-
}, Na = {
|
|
649
|
-
class: "break-all text-xs"
|
|
650
|
-
}, Ua = {
|
|
651
|
-
class: "break-all font-mono text-xs"
|
|
652
|
-
}, Ra = {
|
|
653
|
-
key: 0,
|
|
654
|
-
class: "text-fm-color-typo-success"
|
|
655
|
-
}, Ka = {
|
|
656
|
-
key: 1,
|
|
657
|
-
class: "text-fm-color-typo-error"
|
|
658
|
-
}, Ba = {
|
|
659
|
-
class: "text-fm-color-typo-error"
|
|
660
|
-
}, Ya = {
|
|
661
|
-
class: "text-fm-color-typo-success"
|
|
662
|
-
}, za = {
|
|
663
|
-
key: 1,
|
|
664
|
-
class: "divide-y divide-fm-color-border-default"
|
|
665
|
-
}, qa = {
|
|
666
|
-
class: "flex flex-wrap items-center gap-8"
|
|
667
|
-
}, Ja = {
|
|
668
|
-
class: "break-all font-mono text-xs"
|
|
669
|
-
}, Ha = {
|
|
670
|
-
class: "space-y-4"
|
|
671
|
-
}, Wa = {
|
|
672
|
-
key: 0,
|
|
673
|
-
class: "text-fm-color-typo-success"
|
|
674
|
-
}, Ga = {
|
|
675
|
-
key: 1,
|
|
676
|
-
class: "text-fm-color-typo-error"
|
|
677
|
-
}, Xa = {
|
|
678
|
-
class: "text-fm-color-typo-error"
|
|
679
|
-
}, Qa = {
|
|
680
|
-
class: "text-fm-color-typo-success"
|
|
681
|
-
}, Za = {
|
|
682
|
-
key: 2,
|
|
683
|
-
class: "text-fm-color-typo-secondary"
|
|
684
|
-
}, en = {
|
|
685
|
-
key: 1,
|
|
686
|
-
class: "rounded-lg border border-fm-color-border-default"
|
|
687
|
-
}, tn = {
|
|
688
|
-
class: "text-base font-bold text-fm-color-typo-primary"
|
|
689
|
-
}, on = {
|
|
690
|
-
class: "space-y-12 p-12"
|
|
691
|
-
}, sn = {
|
|
692
|
-
key: 0
|
|
693
|
-
}, an = {
|
|
694
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
695
|
-
}, nn = {
|
|
696
|
-
class: "mt-4 max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner whitespace-pre-wrap break-all"
|
|
697
|
-
}, ln = {
|
|
698
|
-
key: 1
|
|
699
|
-
}, rn = {
|
|
700
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
701
|
-
}, un = {
|
|
702
|
-
class: "mt-4 max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner whitespace-pre-wrap break-all"
|
|
703
|
-
}, ke = 100, ot = 1e3, $e = "__feedmeAdmin__", dn = "D MMM YYYY h:mm A", cn = "YYYY-MM-DD HH:mm", R = "YYYY-MM-DD", Ft = "audit-log-export-fields-v3", fn = /* @__PURE__ */ Mt({
|
|
704
|
-
__name: "AuditLogList",
|
|
705
|
-
setup(t) {
|
|
706
|
-
const {
|
|
707
|
-
t: o,
|
|
708
|
-
te: n
|
|
709
|
-
} = Ot(), r = jo(), d = qo(), g = S(!1), p = S(!1), h = S([]), i = S(null), C = S(!1), O = S({}), k = S(null), V = S(!1);
|
|
710
|
-
async function L(e) {
|
|
711
|
-
const s = Uint8Array.from(atob(e), (x) => x.charCodeAt(0)), u = new DecompressionStream("gzip"), y = u.writable.getWriter();
|
|
712
|
-
return await y.write(s), await y.close(), new Response(u.readable).text();
|
|
713
|
-
}
|
|
714
|
-
const I = S("");
|
|
715
|
-
let K = 0;
|
|
716
|
-
de(() => {
|
|
717
|
-
var e, s;
|
|
718
|
-
return (s = (e = i.value) == null ? void 0 : e.metadata) == null ? void 0 : s.requestBody;
|
|
719
|
-
}, async (e) => {
|
|
720
|
-
const s = ++K;
|
|
721
|
-
if (!e) {
|
|
722
|
-
I.value = "";
|
|
723
|
-
return;
|
|
724
|
-
}
|
|
725
|
-
if (typeof e == "object") {
|
|
726
|
-
I.value = JSON.stringify(e, null, 2);
|
|
727
|
-
return;
|
|
728
|
-
}
|
|
729
|
-
if (e.startsWith("gzip:")) {
|
|
730
|
-
try {
|
|
731
|
-
const u = await L(e.slice(5));
|
|
732
|
-
if (s !== K) return;
|
|
733
|
-
I.value = JSON.stringify(JSON.parse(u), null, 2);
|
|
734
|
-
} catch {
|
|
735
|
-
if (s !== K) return;
|
|
736
|
-
I.value = e;
|
|
737
|
-
}
|
|
738
|
-
return;
|
|
739
|
-
}
|
|
740
|
-
try {
|
|
741
|
-
I.value = JSON.stringify(JSON.parse(e), null, 2);
|
|
742
|
-
} catch {
|
|
743
|
-
I.value = e;
|
|
744
|
-
}
|
|
745
|
-
}, {
|
|
746
|
-
immediate: !0
|
|
747
|
-
});
|
|
748
|
-
async function W(e) {
|
|
749
|
-
if (!e) return;
|
|
750
|
-
let s = e;
|
|
751
|
-
if (e.startsWith("gzip:"))
|
|
752
|
-
try {
|
|
753
|
-
s = await L(e.slice(5));
|
|
754
|
-
} catch {
|
|
755
|
-
return e;
|
|
756
|
-
}
|
|
757
|
-
try {
|
|
758
|
-
return JSON.parse(s);
|
|
759
|
-
} catch {
|
|
760
|
-
return s;
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
function _(e) {
|
|
764
|
-
if (e === void 0) return "";
|
|
765
|
-
if (typeof e == "object" && e !== null)
|
|
766
|
-
try {
|
|
767
|
-
return JSON.stringify(e, null, 2);
|
|
768
|
-
} catch {
|
|
769
|
-
return String(e);
|
|
770
|
-
}
|
|
771
|
-
return String(e);
|
|
772
|
-
}
|
|
773
|
-
const M = S([]), E = S([]), T = S(""), Y = S(""), U = S(!1);
|
|
774
|
-
let w = 0;
|
|
775
|
-
de(k, async (e) => {
|
|
776
|
-
const s = ++w;
|
|
777
|
-
if (M.value = [], E.value = [], T.value = "", Y.value = "", U.value = !1, !e) return;
|
|
778
|
-
const [u, y] = await Promise.all([W(e.before), W(e.after)]);
|
|
779
|
-
s === w && (os(e.changeNodes) ? E.value = e.changeNodes.map(ts) : M.value = es(u, y), T.value = _(u), Y.value = _(y));
|
|
780
|
-
});
|
|
781
|
-
function ce(e) {
|
|
782
|
-
return e === "added" ? "success" : e === "removed" ? "critical" : "warning";
|
|
783
|
-
}
|
|
784
|
-
function ne(e) {
|
|
785
|
-
return o(e === "added" ? "auditLog.operation.added" : e === "removed" ? "auditLog.operation.removed" : "auditLog.operation.updated");
|
|
786
|
-
}
|
|
787
|
-
function Ae(e) {
|
|
788
|
-
return e.replace(/\[[^\]]*\]/g, "");
|
|
789
|
-
}
|
|
790
|
-
function at(e) {
|
|
791
|
-
return e === "add" ? "success" : e === "remove" ? "critical" : "warning";
|
|
792
|
-
}
|
|
793
|
-
function J(e) {
|
|
794
|
-
return o(e === "add" ? "auditLog.operation.added" : e === "remove" ? "auditLog.operation.removed" : "auditLog.operation.updated");
|
|
795
|
-
}
|
|
796
|
-
function he(e) {
|
|
797
|
-
return Ct(o, n, e);
|
|
798
|
-
}
|
|
799
|
-
const nt = A(() => {
|
|
800
|
-
const e = [], s = /* @__PURE__ */ new Map();
|
|
801
|
-
for (const u of M.value) {
|
|
802
|
-
const y = Ae(u.path), x = `${u.type}::${y}`;
|
|
803
|
-
let F = s.get(x);
|
|
804
|
-
F || (F = {
|
|
805
|
-
groupKey: x,
|
|
806
|
-
displayKey: y,
|
|
807
|
-
type: u.type,
|
|
808
|
-
rows: []
|
|
809
|
-
}, s.set(x, F), e.push(F)), F.rows.push(u);
|
|
810
|
-
}
|
|
811
|
-
return e;
|
|
812
|
-
}), Fe = S(1), Vt = S(!1), Re = S(0), lt = A(() => Math.max(1, Math.ceil(Re.value / ke))), rt = D().format("YYYY-MM-DD"), Q = S({
|
|
813
|
-
startDate: `${rt} 00:00`,
|
|
814
|
-
endDate: `${rt} 23:59`
|
|
815
|
-
}), fe = S(), G = S(), Z = S(), ee = S(), le = S("all");
|
|
816
|
-
function Pt(e) {
|
|
817
|
-
return typeof e == "string" ? [e] : Array.isArray(e) ? e.filter((s) => typeof s == "string") : [];
|
|
818
|
-
}
|
|
819
|
-
const it = Se.filter((e) => e.key !== "all").map((e) => e.key);
|
|
820
|
-
function Me(e) {
|
|
821
|
-
const s = Se.find((u) => u.key !== "all" && u.subjectPrefixes.some((y) => e.startsWith(y)));
|
|
822
|
-
return (s == null ? void 0 : s.key) ?? "other";
|
|
823
|
-
}
|
|
824
|
-
function ut(e) {
|
|
825
|
-
const s = it.indexOf(e);
|
|
826
|
-
return s === -1 ? it.length : s;
|
|
827
|
-
}
|
|
828
|
-
const Et = A(() => Se.map(({
|
|
829
|
-
key: e
|
|
830
|
-
}) => ({
|
|
831
|
-
label: o(`auditLog.modules.${e}`),
|
|
832
|
-
value: e
|
|
833
|
-
}))), Ke = A(() => Se.find((e) => e.key === le.value) ?? Se[0]), $t = A(() => le.value === "all"), ye = S([]), Oe = S(!1), Nt = A(() => [...Oe.value ? [{
|
|
834
|
-
label: o("auditLog.user.feedmeAdmin"),
|
|
835
|
-
value: $e
|
|
836
|
-
}] : [], ...d.members.map((e) => ({
|
|
837
|
-
label: e.name,
|
|
838
|
-
value: e.doc.userId
|
|
839
|
-
})), ...ye.value.map((e) => ({
|
|
840
|
-
label: `${e.name} (${o("auditLog.user.feedmeAdmin")})`,
|
|
841
|
-
value: e.userId
|
|
842
|
-
}))]), te = A(() => {
|
|
843
|
-
const e = fe.value ?? [];
|
|
844
|
-
return {
|
|
845
|
-
userIds: e.filter((s) => s !== $e),
|
|
846
|
-
feedmeAdminActors: e.includes($e)
|
|
847
|
-
};
|
|
848
|
-
}), Be = S(""), X = S(""), Ut = No(Be, (e) => {
|
|
849
|
-
X.value = e.trim();
|
|
850
|
-
});
|
|
851
|
-
Oo(Ut);
|
|
852
|
-
const re = A(() => {
|
|
853
|
-
const e = X.value.toLowerCase();
|
|
854
|
-
if (!e) return [];
|
|
855
|
-
const s = /* @__PURE__ */ new Set();
|
|
856
|
-
for (const u of d.members) {
|
|
857
|
-
const y = u.doc.userId;
|
|
858
|
-
((d.userIdToName[y] ?? "").toLowerCase().includes(e) || (d.userIdToEmail[y] ?? "").toLowerCase().includes(e) || (d.userIdToPhone[y] ?? "").toLowerCase().includes(e)) && s.add(y);
|
|
859
|
-
}
|
|
860
|
-
for (const u of ye.value)
|
|
861
|
-
u.name.toLowerCase().includes(e) && s.add(u.userId);
|
|
862
|
-
return [...s];
|
|
863
|
-
}), Ye = A(() => {
|
|
864
|
-
const e = kt.flatMap((x) => Pt(x.subject).map((F) => ({
|
|
865
|
-
label: x.label,
|
|
866
|
-
value: F
|
|
867
|
-
}))), s = Object.entries(St).map(([x, F]) => ({
|
|
868
|
-
label: F,
|
|
869
|
-
value: x
|
|
870
|
-
})), u = /* @__PURE__ */ new Set(), y = [];
|
|
871
|
-
for (const x of [...e, ...s])
|
|
872
|
-
if (!u.has(x.value)) {
|
|
873
|
-
u.add(x.value);
|
|
874
|
-
const F = Me(x.value);
|
|
875
|
-
y.push({
|
|
876
|
-
...x,
|
|
877
|
-
group: o(`auditLog.modules.${F}`)
|
|
878
|
-
});
|
|
879
|
-
}
|
|
880
|
-
return y.sort((x, F) => ut(Me(x.value)) - ut(Me(F.value)));
|
|
881
|
-
}), me = A(() => {
|
|
882
|
-
const e = X.value.toLowerCase();
|
|
883
|
-
if (!e) return [];
|
|
884
|
-
const s = /* @__PURE__ */ new Set();
|
|
885
|
-
for (const u of Ye.value)
|
|
886
|
-
u.label.toLowerCase().includes(e) && s.add(u.value);
|
|
887
|
-
return [...s];
|
|
888
|
-
}), Rt = A(() => $t.value ? Ye.value : Ye.value.filter((e) => Me(e.value) === le.value));
|
|
889
|
-
function Kt(e, s) {
|
|
890
|
-
const u = s.toLowerCase();
|
|
891
|
-
return e.label.toLowerCase().includes(u) || e.value.replace(/^business::/, "").toLowerCase().includes(u) ? !0 : e.value.toLowerCase().includes(u);
|
|
892
|
-
}
|
|
893
|
-
const H = A(() => ({
|
|
894
|
-
manage: o("auditLog.action.manage"),
|
|
895
|
-
create: o("auditLog.action.create"),
|
|
896
|
-
read: o("auditLog.action.read"),
|
|
897
|
-
update: o("auditLog.action.update"),
|
|
898
|
-
delete: o("auditLog.action.delete")
|
|
899
|
-
})), Bt = A(() => [{
|
|
900
|
-
label: H.value.manage,
|
|
901
|
-
value: "manage"
|
|
902
|
-
}, {
|
|
903
|
-
label: H.value.create,
|
|
904
|
-
value: "create"
|
|
905
|
-
}, {
|
|
906
|
-
label: H.value.read,
|
|
907
|
-
value: "read"
|
|
908
|
-
}, {
|
|
909
|
-
label: H.value.update,
|
|
910
|
-
value: "update"
|
|
911
|
-
}, {
|
|
912
|
-
label: H.value.delete,
|
|
913
|
-
value: "delete"
|
|
914
|
-
}]), De = A(() => ({
|
|
915
|
-
allowed: o("auditLog.outcome.success"),
|
|
916
|
-
denied: o("auditLog.outcome.failed"),
|
|
917
|
-
skipped: o("auditLog.outcome.skipped")
|
|
918
|
-
})), ze = A(() => {
|
|
919
|
-
var e;
|
|
920
|
-
return ((e = r.sessionUser.value) == null ? void 0 : e.isInternal) ?? !1;
|
|
921
|
-
});
|
|
922
|
-
function dt(e) {
|
|
923
|
-
return !ze.value && e === "skipped" ? "allowed" : e;
|
|
924
|
-
}
|
|
925
|
-
function qe(e) {
|
|
926
|
-
return !(e != null && e.length) || ze.value ? e : e.includes("allowed") ? [.../* @__PURE__ */ new Set([...e, "skipped"])] : e;
|
|
927
|
-
}
|
|
928
|
-
const Yt = A(() => [{
|
|
929
|
-
label: De.value.allowed,
|
|
930
|
-
value: "allowed"
|
|
931
|
-
}, {
|
|
932
|
-
label: De.value.denied,
|
|
933
|
-
value: "denied"
|
|
934
|
-
}, ...ze.value ? [{
|
|
935
|
-
label: De.value.skipped,
|
|
936
|
-
value: "skipped"
|
|
937
|
-
}] : []]), zt = A(() => ({
|
|
938
|
-
admin: o("auditLog.detail.resolvedFromValue.admin"),
|
|
939
|
-
staff: o("auditLog.detail.resolvedFromValue.staff"),
|
|
940
|
-
permissionSet: o("auditLog.detail.resolvedFromValue.permissionSet"),
|
|
941
|
-
systemPermissionSet: o("auditLog.detail.resolvedFromValue.systemPermissionSet"),
|
|
942
|
-
custom: o("auditLog.detail.resolvedFromValue.custom"),
|
|
943
|
-
"no-match": o("auditLog.detail.resolvedFromValue.noMatch"),
|
|
944
|
-
unknown: o("auditLog.detail.resolvedFromValue.unknown")
|
|
945
|
-
})), qt = A(() => ({
|
|
946
|
-
GET: H.value.read,
|
|
947
|
-
POST: H.value.create,
|
|
948
|
-
PUT: H.value.update,
|
|
949
|
-
PATCH: H.value.update,
|
|
950
|
-
DELETE: H.value.delete
|
|
951
|
-
})), Jt = {
|
|
952
|
-
allowed: "success",
|
|
953
|
-
denied: "critical",
|
|
954
|
-
skipped: "warning"
|
|
955
|
-
};
|
|
956
|
-
function je(e) {
|
|
957
|
-
return D(e).format(dn);
|
|
958
|
-
}
|
|
959
|
-
const Ht = A(() => {
|
|
960
|
-
const {
|
|
961
|
-
startDate: e,
|
|
962
|
-
endDate: s
|
|
963
|
-
} = Q.value;
|
|
964
|
-
return e && s ? `${je(e)} – ${je(s)}` : e ? je(e) : s ? je(s) : o("auditLog.dateRange.placeholder");
|
|
965
|
-
}), Wt = A(() => [{
|
|
966
|
-
label: o("date.predefinedRanges.today"),
|
|
967
|
-
value: {
|
|
968
|
-
startDate: D().format(R),
|
|
969
|
-
endDate: D().format(R)
|
|
970
|
-
}
|
|
971
|
-
}, {
|
|
972
|
-
label: o("date.predefinedRanges.yesterday"),
|
|
973
|
-
value: {
|
|
974
|
-
startDate: D().subtract(1, "day").format(R),
|
|
975
|
-
endDate: D().subtract(1, "day").format(R)
|
|
976
|
-
}
|
|
977
|
-
}, {
|
|
978
|
-
label: o("date.predefinedRanges.thisWeek"),
|
|
979
|
-
value: {
|
|
980
|
-
startDate: D().startOf("week").format(R),
|
|
981
|
-
endDate: D().endOf("week").format(R)
|
|
982
|
-
}
|
|
983
|
-
}, {
|
|
984
|
-
label: o("date.predefinedRanges.lastWeek"),
|
|
985
|
-
value: {
|
|
986
|
-
startDate: D().subtract(1, "week").startOf("week").format(R),
|
|
987
|
-
endDate: D().subtract(1, "week").endOf("week").format(R)
|
|
988
|
-
}
|
|
989
|
-
}, {
|
|
990
|
-
label: o("date.predefinedRanges.last7Days"),
|
|
991
|
-
value: {
|
|
992
|
-
startDate: D().subtract(7, "day").format(R),
|
|
993
|
-
endDate: D().subtract(1, "day").format(R)
|
|
994
|
-
}
|
|
995
|
-
}, {
|
|
996
|
-
label: o("date.predefinedRanges.thisMonth"),
|
|
997
|
-
value: {
|
|
998
|
-
startDate: D().startOf("month").format(R),
|
|
999
|
-
endDate: D().endOf("month").format(R)
|
|
1000
|
-
}
|
|
1001
|
-
}, {
|
|
1002
|
-
label: o("date.predefinedRanges.lastMonth"),
|
|
1003
|
-
value: {
|
|
1004
|
-
startDate: D().subtract(1, "month").startOf("month").format(R),
|
|
1005
|
-
endDate: D().subtract(1, "month").endOf("month").format(R)
|
|
1006
|
-
}
|
|
1007
|
-
}]);
|
|
1008
|
-
function Je(e) {
|
|
1009
|
-
var s;
|
|
1010
|
-
return ((s = kt.find((u) => u.subject === e)) == null ? void 0 : s.label) ?? St[e];
|
|
1011
|
-
}
|
|
1012
|
-
function be(e) {
|
|
1013
|
-
var u, y;
|
|
1014
|
-
if (e.actorType === "portalUser")
|
|
1015
|
-
return e.actorName ?? e.userId;
|
|
1016
|
-
if (e.actorType === "feedmeAdmin")
|
|
1017
|
-
return (u = r.sessionUser.value) != null && u.isInternal ? `${e.actorName ?? e.userId} (${o("auditLog.user.feedmeAdmin")})` : o("auditLog.user.feedmeAdmin");
|
|
1018
|
-
const s = d.userIdToName[e.userId];
|
|
1019
|
-
return s || (d.hasLoaded ? (y = r.sessionUser.value) != null && y.isInternal ? `${e.actorName ?? e.userId} (${o("auditLog.user.feedmeAdmin")})` : o("auditLog.user.feedmeAdmin") : e.userId);
|
|
1020
|
-
}
|
|
1021
|
-
function ct(e) {
|
|
1022
|
-
return d.userIdToPhone[e.userId] || "-";
|
|
1023
|
-
}
|
|
1024
|
-
function Gt(e) {
|
|
1025
|
-
return d.userIdToEmail[e.userId] || "-";
|
|
1026
|
-
}
|
|
1027
|
-
function ft(e) {
|
|
1028
|
-
return D(e).format("DD MMM YYYY, HH:mm");
|
|
1029
|
-
}
|
|
1030
|
-
function mt(e) {
|
|
1031
|
-
return D(e).format("DD MMM YYYY, HH:mm:ss").toUpperCase();
|
|
1032
|
-
}
|
|
1033
|
-
function vt(e) {
|
|
1034
|
-
return H.value[e] ?? e;
|
|
1035
|
-
}
|
|
1036
|
-
function pt(e) {
|
|
1037
|
-
return st(o, {
|
|
1038
|
-
eventKey: e.eventKey,
|
|
1039
|
-
params: e.params,
|
|
1040
|
-
operationLabel: e.metadata.operationLabel ?? vt(e.action)
|
|
1041
|
-
});
|
|
1042
|
-
}
|
|
1043
|
-
function gt(e) {
|
|
1044
|
-
return st(o, e) || o("auditLog.operation.unlabeled");
|
|
1045
|
-
}
|
|
1046
|
-
function Xt(e) {
|
|
1047
|
-
return Je(e.subject) ?? e.subject;
|
|
1048
|
-
}
|
|
1049
|
-
function He(e) {
|
|
1050
|
-
return De.value[dt(e)];
|
|
1051
|
-
}
|
|
1052
|
-
function ht(e) {
|
|
1053
|
-
return Jt[dt(e)] ?? "neutral";
|
|
1054
|
-
}
|
|
1055
|
-
function Qt(e) {
|
|
1056
|
-
return zt.value[e] ?? e;
|
|
1057
|
-
}
|
|
1058
|
-
function Zt(e) {
|
|
1059
|
-
return e.metadata.requestMethod ? qt.value[e.metadata.requestMethod] ?? e.metadata.requestMethod : vt(e.action);
|
|
1060
|
-
}
|
|
1061
|
-
function yt(e) {
|
|
1062
|
-
const s = String(e ?? "");
|
|
1063
|
-
return `"${(/^[=+\-@\t\r]/.test(s) ? `'${s}` : s).replace(/"/g, '""')}"`;
|
|
1064
|
-
}
|
|
1065
|
-
const We = [{
|
|
1066
|
-
key: "timestamp",
|
|
1067
|
-
labelKey: "auditLog.exportFields.timestamp",
|
|
1068
|
-
getValue: (e) => ft(e.timestamp),
|
|
1069
|
-
defaultSelected: !0
|
|
1070
|
-
}, {
|
|
1071
|
-
key: "userName",
|
|
1072
|
-
labelKey: "auditLog.exportFields.userName",
|
|
1073
|
-
getValue: (e) => be(e),
|
|
1074
|
-
defaultSelected: !0
|
|
1075
|
-
}, {
|
|
1076
|
-
key: "userPhone",
|
|
1077
|
-
labelKey: "auditLog.exportFields.userPhone",
|
|
1078
|
-
getValue: (e) => ct(e),
|
|
1079
|
-
defaultSelected: !0
|
|
1080
|
-
}, {
|
|
1081
|
-
key: "subject",
|
|
1082
|
-
labelKey: "auditLog.exportFields.subject",
|
|
1083
|
-
getValue: (e) => Je(e.subject) ?? e.subject,
|
|
1084
|
-
defaultSelected: !0
|
|
1085
|
-
}, {
|
|
1086
|
-
key: "action",
|
|
1087
|
-
labelKey: "auditLog.exportFields.action",
|
|
1088
|
-
getValue: (e) => e.action,
|
|
1089
|
-
defaultSelected: !0
|
|
1090
|
-
}, {
|
|
1091
|
-
key: "operation",
|
|
1092
|
-
labelKey: "auditLog.exportFields.operation",
|
|
1093
|
-
getValue: (e) => pt(e),
|
|
1094
|
-
defaultSelected: !0
|
|
1095
|
-
}, {
|
|
1096
|
-
key: "outcome",
|
|
1097
|
-
labelKey: "auditLog.exportFields.outcome",
|
|
1098
|
-
getValue: (e) => He(e.outcome),
|
|
1099
|
-
defaultSelected: !0
|
|
1100
|
-
}, {
|
|
1101
|
-
key: "operationEvents",
|
|
1102
|
-
labelKey: "auditLog.exportFields.operationEvents",
|
|
1103
|
-
getValue: (e) => ss(o, e.operations),
|
|
1104
|
-
defaultSelected: !0
|
|
1105
|
-
}, {
|
|
1106
|
-
key: "changes",
|
|
1107
|
-
labelKey: "auditLog.exportFields.changes",
|
|
1108
|
-
getValue: (e) => ns(o, n, e.operations),
|
|
1109
|
-
defaultSelected: !1
|
|
1110
|
-
}, {
|
|
1111
|
-
key: "businessId",
|
|
1112
|
-
labelKey: "auditLog.exportFields.businessId",
|
|
1113
|
-
getValue: (e) => e.businessId,
|
|
1114
|
-
defaultSelected: !1
|
|
1115
|
-
}, {
|
|
1116
|
-
key: "restaurantId",
|
|
1117
|
-
labelKey: "auditLog.exportFields.restaurantId",
|
|
1118
|
-
getValue: (e) => e.restaurantId,
|
|
1119
|
-
defaultSelected: !1
|
|
1120
|
-
}, {
|
|
1121
|
-
key: "country",
|
|
1122
|
-
labelKey: "auditLog.exportFields.country",
|
|
1123
|
-
getValue: (e) => e.country,
|
|
1124
|
-
defaultSelected: !1
|
|
1125
|
-
}, {
|
|
1126
|
-
key: "resolvedFrom",
|
|
1127
|
-
labelKey: "auditLog.exportFields.resolvedFrom",
|
|
1128
|
-
getValue: (e) => {
|
|
1129
|
-
var s;
|
|
1130
|
-
return (s = e.metadata) == null ? void 0 : s.resolvedFrom;
|
|
1131
|
-
},
|
|
1132
|
-
defaultSelected: !1
|
|
1133
|
-
}, {
|
|
1134
|
-
key: "requestMethod",
|
|
1135
|
-
labelKey: "auditLog.exportFields.requestMethod",
|
|
1136
|
-
getValue: (e) => {
|
|
1137
|
-
var s;
|
|
1138
|
-
return (s = e.metadata) == null ? void 0 : s.requestMethod;
|
|
1139
|
-
},
|
|
1140
|
-
defaultSelected: !1
|
|
1141
|
-
}, {
|
|
1142
|
-
key: "requestPath",
|
|
1143
|
-
labelKey: "auditLog.exportFields.requestPath",
|
|
1144
|
-
getValue: (e) => {
|
|
1145
|
-
var s;
|
|
1146
|
-
return (s = e.metadata) == null ? void 0 : s.requestPath;
|
|
1147
|
-
},
|
|
1148
|
-
defaultSelected: !1
|
|
1149
|
-
}, {
|
|
1150
|
-
key: "traceId",
|
|
1151
|
-
labelKey: "auditLog.exportFields.traceId",
|
|
1152
|
-
getValue: (e) => e.traceId ?? "",
|
|
1153
|
-
defaultSelected: !1
|
|
1154
|
-
}];
|
|
1155
|
-
function eo() {
|
|
1156
|
-
try {
|
|
1157
|
-
const e = localStorage.getItem(Ft);
|
|
1158
|
-
if (e) {
|
|
1159
|
-
const s = JSON.parse(e);
|
|
1160
|
-
if (Array.isArray(s) && s.length > 0) return new Set(s);
|
|
1161
|
-
}
|
|
1162
|
-
} catch {
|
|
1163
|
-
}
|
|
1164
|
-
return new Set(We.filter((e) => e.defaultSelected).map((e) => e.key));
|
|
1165
|
-
}
|
|
1166
|
-
const ve = S(eo());
|
|
1167
|
-
function to(e) {
|
|
1168
|
-
const s = new Set(ve.value);
|
|
1169
|
-
if (s.has(e)) {
|
|
1170
|
-
if (s.size <= 1) return;
|
|
1171
|
-
s.delete(e);
|
|
1172
|
-
} else
|
|
1173
|
-
s.add(e);
|
|
1174
|
-
ve.value = s;
|
|
1175
|
-
try {
|
|
1176
|
-
localStorage.setItem(Ft, JSON.stringify([...s]));
|
|
1177
|
-
} catch {
|
|
1178
|
-
}
|
|
1179
|
-
}
|
|
1180
|
-
async function oo() {
|
|
1181
|
-
var e, s, u, y, x;
|
|
1182
|
-
if (!p.value) {
|
|
1183
|
-
p.value = !0;
|
|
1184
|
-
try {
|
|
1185
|
-
const {
|
|
1186
|
-
startDate: F,
|
|
1187
|
-
endDate: $
|
|
1188
|
-
} = Q.value, oe = Ke.value.subjectPrefixes, Ce = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace("T", " "), _e = $ ? se($) : null, Te = _e && _e < Ce ? _e : Ce, Xe = {
|
|
1189
|
-
...F ? {
|
|
1190
|
-
from: se(F)
|
|
1191
|
-
} : {},
|
|
1192
|
-
to: Te,
|
|
1193
|
-
...te.value.userIds.length ? {
|
|
1194
|
-
userIds: te.value.userIds
|
|
1195
|
-
} : {},
|
|
1196
|
-
...te.value.feedmeAdminActors ? {
|
|
1197
|
-
feedmeAdminActors: !0
|
|
1198
|
-
} : {},
|
|
1199
|
-
...(e = G.value) != null && e.length ? {
|
|
1200
|
-
subjects: G.value
|
|
1201
|
-
} : {},
|
|
1202
|
-
...oe.length ? {
|
|
1203
|
-
subjectPrefixes: [...oe]
|
|
1204
|
-
} : {},
|
|
1205
|
-
...(s = ee.value) != null && s.length ? {
|
|
1206
|
-
actions: ee.value
|
|
1207
|
-
} : {},
|
|
1208
|
-
...(u = Z.value) != null && u.length ? {
|
|
1209
|
-
outcomes: qe(Z.value)
|
|
1210
|
-
} : {},
|
|
1211
|
-
...X.value ? {
|
|
1212
|
-
search: X.value
|
|
1213
|
-
} : {},
|
|
1214
|
-
...re.value.length ? {
|
|
1215
|
-
searchUserIds: re.value
|
|
1216
|
-
} : {},
|
|
1217
|
-
...me.value.length ? {
|
|
1218
|
-
searchSubjects: me.value
|
|
1219
|
-
} : {}
|
|
1220
|
-
}, xe = [];
|
|
1221
|
-
let f = 0;
|
|
1222
|
-
for (; ; ) {
|
|
1223
|
-
const z = await Ee.read({
|
|
1224
|
-
...Xe,
|
|
1225
|
-
limit: ot,
|
|
1226
|
-
offset: f
|
|
1227
|
-
});
|
|
1228
|
-
if (xe.push(...z), z.length < ot) break;
|
|
1229
|
-
f += ot;
|
|
1230
|
-
}
|
|
1231
|
-
const P = We.filter((z) => ve.value.has(z.key)), go = P.map((z) => o(z.labelKey)), ho = xe.map((z) => P.map((Io) => Io.getValue(z) ?? "")), Qe = -(/* @__PURE__ */ new Date()).getTimezoneOffset(), yo = Qe >= 0 ? "+" : "-", bo = String(Math.floor(Math.abs(Qe) / 60)).padStart(2, "0"), _o = String(Math.abs(Qe) % 60).padStart(2, "0"), xo = `UTC${yo}${bo}:${_o}`, xt = ((y = r.currentBusiness.value) == null ? void 0 : y.name) || "", Lo = [F, $].filter(Boolean).join(" – "), So = [...[[o("auditLog.title")], [`${o("auditLog.frontMatter.date")}: ${Lo}`], ...xt ? [[`${o("auditLog.frontMatter.business")}: ${xt}`]] : [], [`${o("auditLog.frontMatter.generatedBy")}: ${D().format("DD MMM YYYY, HH:mm")} (${xo})`], []].map((z) => z.map(yt).join(",")), ...[go, ...ho].map((z) => z.map(yt).join(","))].join(`
|
|
1232
|
-
`), ko = `audit-log_${(((x = r.currentBusiness.value) == null ? void 0 : x.name) || "business").replace(/[^a-z0-9_-]+/gi, "_")}_${D().format("YYYYMMDD_HHmmss")}.csv`, wo = new Blob([`\uFEFF${So}`], {
|
|
1233
|
-
type: "text/csv;charset=utf-8;"
|
|
1234
|
-
}), Lt = window.URL.createObjectURL(wo), Le = document.createElement("a");
|
|
1235
|
-
Le.href = Lt, Le.download = ko, document.body.appendChild(Le), Le.click(), Le.remove(), window.URL.revokeObjectURL(Lt);
|
|
1236
|
-
} finally {
|
|
1237
|
-
p.value = !1;
|
|
1238
|
-
}
|
|
1239
|
-
}
|
|
1240
|
-
}
|
|
1241
|
-
function ie(e) {
|
|
1242
|
-
return "status" in e;
|
|
1243
|
-
}
|
|
1244
|
-
function so(e) {
|
|
1245
|
-
return At(e) ? m(ue.FmTooltip, {
|
|
1246
|
-
variant: "plain",
|
|
1247
|
-
placement: "top"
|
|
1248
|
-
}, {
|
|
1249
|
-
default: () => m(ue.FmIcon, {
|
|
1250
|
-
name: "error",
|
|
1251
|
-
size: "sm",
|
|
1252
|
-
class: "cursor-help text-fm-color-typo-error"
|
|
1253
|
-
}, null),
|
|
1254
|
-
content: () => o("auditLog.operation.partialFailure")
|
|
1255
|
-
}) : null;
|
|
1256
|
-
}
|
|
1257
|
-
function ao(e) {
|
|
1258
|
-
var u;
|
|
1259
|
-
const s = e.original;
|
|
1260
|
-
return e.depth === 0 && !ie(s) && !!((u = s.operations) != null && u.length);
|
|
1261
|
-
}
|
|
1262
|
-
function no(e) {
|
|
1263
|
-
return ie(e) ? void 0 : e.operations;
|
|
1264
|
-
}
|
|
1265
|
-
const lo = [{
|
|
1266
|
-
accessorKey: "timestamp",
|
|
1267
|
-
header: () => o("auditLog.columns.timestamp"),
|
|
1268
|
-
cell(e) {
|
|
1269
|
-
return ft(e.row.original.timestamp);
|
|
1270
|
-
}
|
|
1271
|
-
}, {
|
|
1272
|
-
accessorKey: "userId",
|
|
1273
|
-
header: () => o("auditLog.columns.user"),
|
|
1274
|
-
enableSorting: !1,
|
|
1275
|
-
size: 220,
|
|
1276
|
-
cell(e) {
|
|
1277
|
-
const s = e.row.original;
|
|
1278
|
-
return ie(s) ? null : m("div", {
|
|
1279
|
-
class: "flex items-center gap-8"
|
|
1280
|
-
}, [m(ue.FmAvatar, {
|
|
1281
|
-
name: be(s),
|
|
1282
|
-
initials: Uo(be(s)),
|
|
1283
|
-
size: "sm",
|
|
1284
|
-
class: "shrink-0"
|
|
1285
|
-
}, null), m("div", {
|
|
1286
|
-
class: "min-w-0"
|
|
1287
|
-
}, [m("p", {
|
|
1288
|
-
class: "truncate font-semibold"
|
|
1289
|
-
}, [be(s)]), m("p", {
|
|
1290
|
-
class: "truncate text-fm-color-typo-secondary"
|
|
1291
|
-
}, [ct(s)])])]);
|
|
1292
|
-
}
|
|
1293
|
-
}, {
|
|
1294
|
-
accessorKey: "subject",
|
|
1295
|
-
header: () => o("auditLog.columns.subject"),
|
|
1296
|
-
cell(e) {
|
|
1297
|
-
const s = e.row.original;
|
|
1298
|
-
return ie(s) ? m("span", {
|
|
1299
|
-
class: "text-fm-color-typo-secondary"
|
|
1300
|
-
}, [o("auditLog.operation.rowHint")]) : Je(s.subject) ?? s.subject;
|
|
1301
|
-
}
|
|
1302
|
-
}, {
|
|
1303
|
-
accessorKey: "action",
|
|
1304
|
-
header: () => o("auditLog.columns.action"),
|
|
1305
|
-
enableSorting: !1,
|
|
1306
|
-
size: 280,
|
|
1307
|
-
meta: {
|
|
1308
|
-
cellSpanClass: "audit-log-action-label"
|
|
1309
|
-
},
|
|
1310
|
-
cell(e) {
|
|
1311
|
-
var $;
|
|
1312
|
-
const s = e.row.original;
|
|
1313
|
-
if (ie(s))
|
|
1314
|
-
return m("span", {
|
|
1315
|
-
class: "audit-op-marker flex flex-wrap items-baseline gap-4"
|
|
1316
|
-
}, [m("span", {
|
|
1317
|
-
class: "text-fm-color-typo-secondary"
|
|
1318
|
-
}, [Ve("↳")]), m("span", {
|
|
1319
|
-
class: "font-semibold"
|
|
1320
|
-
}, [gt(s)]), s.entityId ? m("span", {
|
|
1321
|
-
class: "text-fm-color-typo-secondary"
|
|
1322
|
-
}, [Ve("· "), s.entityId]) : null, s.status === "failed" && s.errorMessage ? m("span", {
|
|
1323
|
-
class: "text-fm-color-typo-error"
|
|
1324
|
-
}, [Ve("· "), s.errorMessage]) : null]);
|
|
1325
|
-
const u = (($ = s.operations) == null ? void 0 : $.length) ?? 0, y = (oe) => {
|
|
1326
|
-
oe.stopPropagation(), e.row.getToggleExpandedHandler()();
|
|
1327
|
-
}, x = {
|
|
1328
|
-
variant: "tertiary",
|
|
1329
|
-
icon: e.row.getIsExpanded() ? "keyboard_arrow_up" : "keyboard_arrow_down",
|
|
1330
|
-
"aria-label": o("auditLog.operation.toggle"),
|
|
1331
|
-
class: "ml-auto shrink-0",
|
|
1332
|
-
onClick: y
|
|
1333
|
-
}, F = ue.FmButton;
|
|
1334
|
-
return m("span", {
|
|
1335
|
-
class: "flex items-center gap-8"
|
|
1336
|
-
}, [m("span", null, [pt(s)]), u > 0 ? m("span", {
|
|
1337
|
-
class: "cursor-pointer",
|
|
1338
|
-
onClick: y
|
|
1339
|
-
}, [m(ue.FmChip, {
|
|
1340
|
-
variant: "neutral",
|
|
1341
|
-
compact: !0,
|
|
1342
|
-
label: o("auditLog.operation.badge", {
|
|
1343
|
-
count: u
|
|
1344
|
-
})
|
|
1345
|
-
}, null)]) : null, e.row.getCanExpand() ? m(F, x, null) : null]);
|
|
1346
|
-
}
|
|
1347
|
-
}, {
|
|
1348
|
-
accessorKey: "outcome",
|
|
1349
|
-
header: () => o("auditLog.columns.outcome"),
|
|
1350
|
-
enableSorting: !1,
|
|
1351
|
-
cell(e) {
|
|
1352
|
-
const s = e.row.original;
|
|
1353
|
-
return ie(s) ? m(ue.FmChip, {
|
|
1354
|
-
variant: s.status === "failed" ? "critical" : "success",
|
|
1355
|
-
label: s.status === "failed" ? o("auditLog.outcome.failed") : o("auditLog.outcome.success"),
|
|
1356
|
-
compact: !0
|
|
1357
|
-
}, null) : m("span", {
|
|
1358
|
-
class: "flex items-center gap-4"
|
|
1359
|
-
}, [m(ue.FmChip, {
|
|
1360
|
-
variant: ht(s.outcome),
|
|
1361
|
-
label: He(s.outcome),
|
|
1362
|
-
compact: !0
|
|
1363
|
-
}, null), so(s)]);
|
|
1364
|
-
}
|
|
1365
|
-
}];
|
|
1366
|
-
function se(e) {
|
|
1367
|
-
const s = D(e, cn);
|
|
1368
|
-
return new Date(s.year(), s.month(), s.date(), s.hour(), s.minute(), 0).toISOString().slice(0, 19).replace("T", " ");
|
|
1369
|
-
}
|
|
1370
|
-
async function bt() {
|
|
1371
|
-
var e, s, u;
|
|
1372
|
-
g.value = !0;
|
|
1373
|
-
try {
|
|
1374
|
-
const {
|
|
1375
|
-
startDate: y,
|
|
1376
|
-
endDate: x
|
|
1377
|
-
} = Q.value, F = (Fe.value - 1) * ke, $ = Ke.value.subjectPrefixes, oe = await Ee.read({
|
|
1378
|
-
limit: ke,
|
|
1379
|
-
offset: F,
|
|
1380
|
-
...y ? {
|
|
1381
|
-
from: se(y)
|
|
1382
|
-
} : {},
|
|
1383
|
-
...x ? {
|
|
1384
|
-
to: se(x)
|
|
1385
|
-
} : {},
|
|
1386
|
-
...te.value.userIds.length ? {
|
|
1387
|
-
userIds: te.value.userIds
|
|
1388
|
-
} : {},
|
|
1389
|
-
...te.value.feedmeAdminActors ? {
|
|
1390
|
-
feedmeAdminActors: !0
|
|
1391
|
-
} : {},
|
|
1392
|
-
...(e = G.value) != null && e.length ? {
|
|
1393
|
-
subjects: G.value
|
|
1394
|
-
} : {},
|
|
1395
|
-
...$.length ? {
|
|
1396
|
-
subjectPrefixes: [...$]
|
|
1397
|
-
} : {},
|
|
1398
|
-
...(s = ee.value) != null && s.length ? {
|
|
1399
|
-
actions: ee.value
|
|
1400
|
-
} : {},
|
|
1401
|
-
...(u = Z.value) != null && u.length ? {
|
|
1402
|
-
outcomes: qe(Z.value)
|
|
1403
|
-
} : {},
|
|
1404
|
-
...X.value ? {
|
|
1405
|
-
search: X.value
|
|
1406
|
-
} : {},
|
|
1407
|
-
...re.value.length ? {
|
|
1408
|
-
searchUserIds: re.value
|
|
1409
|
-
} : {},
|
|
1410
|
-
...me.value.length ? {
|
|
1411
|
-
searchSubjects: me.value
|
|
1412
|
-
} : {}
|
|
1413
|
-
});
|
|
1414
|
-
h.value = oe, Vt.value = oe.length === ke, O.value = {};
|
|
1415
|
-
} finally {
|
|
1416
|
-
g.value = !1;
|
|
1417
|
-
}
|
|
1418
|
-
}
|
|
1419
|
-
const _t = A(() => {
|
|
1420
|
-
var e;
|
|
1421
|
-
return JSON.stringify({
|
|
1422
|
-
businessId: ((e = r.currentBusiness.value) == null ? void 0 : e._id) ?? "",
|
|
1423
|
-
dateRange: Q.value,
|
|
1424
|
-
users: [...fe.value ?? []].sort(),
|
|
1425
|
-
subjects: [...G.value ?? []].sort(),
|
|
1426
|
-
outcomes: [...Z.value ?? []].sort(),
|
|
1427
|
-
actions: [...ee.value ?? []].sort(),
|
|
1428
|
-
moduleKey: le.value,
|
|
1429
|
-
search: X.value,
|
|
1430
|
-
// Member/feedme-admin-actor lists resolve asynchronously (and actors refetch on
|
|
1431
|
-
// every date-range change), so searchUserIds can change after the key above is
|
|
1432
|
-
// computed — include it explicitly or a late-arriving match never refetches.
|
|
1433
|
-
searchUserIds: [...re.value].sort()
|
|
1434
|
-
});
|
|
1435
|
-
});
|
|
1436
|
-
async function ro() {
|
|
1437
|
-
var y, x, F;
|
|
1438
|
-
const {
|
|
1439
|
-
startDate: e,
|
|
1440
|
-
endDate: s
|
|
1441
|
-
} = Q.value, u = Ke.value.subjectPrefixes;
|
|
1442
|
-
Re.value = await Ee.count({
|
|
1443
|
-
...e ? {
|
|
1444
|
-
from: se(e)
|
|
1445
|
-
} : {},
|
|
1446
|
-
...s ? {
|
|
1447
|
-
to: se(s)
|
|
1448
|
-
} : {},
|
|
1449
|
-
...te.value.userIds.length ? {
|
|
1450
|
-
userIds: te.value.userIds
|
|
1451
|
-
} : {},
|
|
1452
|
-
...te.value.feedmeAdminActors ? {
|
|
1453
|
-
feedmeAdminActors: !0
|
|
1454
|
-
} : {},
|
|
1455
|
-
...(y = G.value) != null && y.length ? {
|
|
1456
|
-
subjects: G.value
|
|
1457
|
-
} : {},
|
|
1458
|
-
...u.length ? {
|
|
1459
|
-
subjectPrefixes: [...u]
|
|
1460
|
-
} : {},
|
|
1461
|
-
...(x = ee.value) != null && x.length ? {
|
|
1462
|
-
actions: ee.value
|
|
1463
|
-
} : {},
|
|
1464
|
-
...(F = Z.value) != null && F.length ? {
|
|
1465
|
-
outcomes: qe(Z.value)
|
|
1466
|
-
} : {},
|
|
1467
|
-
...X.value ? {
|
|
1468
|
-
search: X.value
|
|
1469
|
-
} : {},
|
|
1470
|
-
...re.value.length ? {
|
|
1471
|
-
searchUserIds: re.value
|
|
1472
|
-
} : {},
|
|
1473
|
-
...me.value.length ? {
|
|
1474
|
-
searchSubjects: me.value
|
|
1475
|
-
} : {}
|
|
1476
|
-
});
|
|
1477
|
-
}
|
|
1478
|
-
de(_t, async () => {
|
|
1479
|
-
var e;
|
|
1480
|
-
Fe.value = 1, (e = r.currentBusiness.value) != null && e._id && await Promise.all([ro(), bt()]);
|
|
1481
|
-
}, {
|
|
1482
|
-
immediate: !0
|
|
1483
|
-
}), de(le, () => {
|
|
1484
|
-
G.value = void 0;
|
|
1485
|
-
});
|
|
1486
|
-
let Ge = !1;
|
|
1487
|
-
async function io({
|
|
1488
|
-
pageIndex: e
|
|
1489
|
-
}) {
|
|
1490
|
-
var s;
|
|
1491
|
-
if ((s = r.currentBusiness.value) != null && s._id && !(e === 0 && Fe.value === 1) && !Ge) {
|
|
1492
|
-
Ge = !0, Fe.value = e + 1;
|
|
1493
|
-
try {
|
|
1494
|
-
await bt();
|
|
1495
|
-
} finally {
|
|
1496
|
-
Ge = !1;
|
|
1497
|
-
}
|
|
1498
|
-
}
|
|
1499
|
-
}
|
|
1500
|
-
function uo(e) {
|
|
1501
|
-
if (ie(e)) {
|
|
1502
|
-
fo(e);
|
|
1503
|
-
return;
|
|
1504
|
-
}
|
|
1505
|
-
i.value = e, C.value = !0;
|
|
1506
|
-
}
|
|
1507
|
-
function co() {
|
|
1508
|
-
C.value = !1, i.value = null;
|
|
1509
|
-
}
|
|
1510
|
-
function fo(e) {
|
|
1511
|
-
k.value = e, V.value = !0;
|
|
1512
|
-
}
|
|
1513
|
-
function mo() {
|
|
1514
|
-
V.value = !1, k.value = null;
|
|
1515
|
-
}
|
|
1516
|
-
de(r.currentBusiness, (e) => {
|
|
1517
|
-
e && d.readTeamMembers();
|
|
1518
|
-
}, {
|
|
1519
|
-
immediate: !0
|
|
1520
|
-
});
|
|
1521
|
-
function vo() {
|
|
1522
|
-
const e = fe.value;
|
|
1523
|
-
if (!(e != null && e.length)) return;
|
|
1524
|
-
const s = new Set(ye.value.map((x) => x.userId)), u = new Set(d.members.map((x) => x.doc.userId)), y = e.filter((x) => x === $e ? Oe.value : d.hasLoaded ? u.has(x) || s.has(x) : !0);
|
|
1525
|
-
y.length !== e.length && (fe.value = y.length ? y : void 0);
|
|
1526
|
-
}
|
|
1527
|
-
async function po() {
|
|
1528
|
-
var u;
|
|
1529
|
-
if (!((u = r.currentBusiness.value) != null && u._id)) return;
|
|
1530
|
-
const {
|
|
1531
|
-
startDate: e,
|
|
1532
|
-
endDate: s
|
|
1533
|
-
} = Q.value;
|
|
1534
|
-
try {
|
|
1535
|
-
const {
|
|
1536
|
-
actors: y,
|
|
1537
|
-
showFeedmeAdminFilter: x
|
|
1538
|
-
} = await Ee.getFeedmeAdminFilter({
|
|
1539
|
-
...e ? {
|
|
1540
|
-
from: se(e)
|
|
1541
|
-
} : {},
|
|
1542
|
-
...s ? {
|
|
1543
|
-
to: se(s)
|
|
1544
|
-
} : {}
|
|
1545
|
-
});
|
|
1546
|
-
ye.value = y, Oe.value = x;
|
|
1547
|
-
} catch {
|
|
1548
|
-
ye.value = [], Oe.value = !1;
|
|
1549
|
-
}
|
|
1550
|
-
vo();
|
|
1551
|
-
}
|
|
1552
|
-
return de(() => {
|
|
1553
|
-
var e;
|
|
1554
|
-
return {
|
|
1555
|
-
businessId: (e = r.currentBusiness.value) == null ? void 0 : e._id,
|
|
1556
|
-
range: Q.value
|
|
1557
|
-
};
|
|
1558
|
-
}, () => po(), {
|
|
1559
|
-
immediate: !0,
|
|
1560
|
-
deep: !0
|
|
1561
|
-
}), (e, s) => {
|
|
1562
|
-
const u = N("FmSpacer"), y = N("FmButton"), x = N("FmMenuItem"), F = N("FmMenu"), $ = N("FmChip"), oe = N("FmDateRangePicker"), Ce = N("FmSearch"), _e = N("FmTable"), Te = N("FmIcon"), Xe = N("FmTooltip"), xe = N("FmSideSheet");
|
|
1563
|
-
return v(), b(q, null, [m(Vo, {
|
|
1564
|
-
heading: c(o)("auditLog.title")
|
|
1565
|
-
}, {
|
|
1566
|
-
"append-heading": B(() => [m(u), m(y, {
|
|
1567
|
-
variant: "primary",
|
|
1568
|
-
"prepend-icon": "upload",
|
|
1569
|
-
label: c(o)("auditLog.export"),
|
|
1570
|
-
disabled: h.value.length === 0 || p.value || c(d).isLoading || c(d).members.length === 0,
|
|
1571
|
-
loading: p.value,
|
|
1572
|
-
onClick: oo
|
|
1573
|
-
}, null, 8, ["label", "disabled", "loading"]), m(F, {
|
|
1574
|
-
"close-on-click": !1,
|
|
1575
|
-
"z-index": 50
|
|
1576
|
-
}, {
|
|
1577
|
-
"menu-button": B(() => [m(y, {
|
|
1578
|
-
variant: "tertiary",
|
|
1579
|
-
icon: "settings",
|
|
1580
|
-
"aria-label": c(o)("auditLog.exportSettings.title"),
|
|
1581
|
-
disabled: p.value
|
|
1582
|
-
}, null, 8, ["aria-label", "disabled"])]),
|
|
1583
|
-
default: B(() => [a("div", ls, [a("p", rs, l(c(o)("auditLog.exportSettings.title")), 1), (v(), b(q, null, ae(We, (f) => m(x, {
|
|
1584
|
-
key: f.key,
|
|
1585
|
-
label: c(o)(f.labelKey),
|
|
1586
|
-
"has-checkbox": "",
|
|
1587
|
-
"model-value": ve.value.has(f.key),
|
|
1588
|
-
disabled: ve.value.has(f.key) && ve.value.size === 1,
|
|
1589
|
-
onClick: (P) => to(f.key)
|
|
1590
|
-
}, null, 8, ["label", "model-value", "disabled", "onClick"])), 64))])]),
|
|
1591
|
-
_: 1
|
|
1592
|
-
})]),
|
|
1593
|
-
default: B(() => [a("div", is, [a("div", us, [m(zo, {
|
|
1594
|
-
modelValue: le.value,
|
|
1595
|
-
"onUpdate:modelValue": s[0] || (s[0] = (f) => le.value = f),
|
|
1596
|
-
items: Et.value
|
|
1597
|
-
}, null, 8, ["modelValue", "items"]), a("div", ds, [m(oe, {
|
|
1598
|
-
modelValue: Q.value,
|
|
1599
|
-
"onUpdate:modelValue": s[1] || (s[1] = (f) => Q.value = f),
|
|
1600
|
-
"show-predefined-range": "",
|
|
1601
|
-
"show-time": "",
|
|
1602
|
-
"predefined-range": Wt.value
|
|
1603
|
-
}, {
|
|
1604
|
-
"trigger-button": B(() => [m($, {
|
|
1605
|
-
label: Ht.value,
|
|
1606
|
-
icon: "calendar_month"
|
|
1607
|
-
}, null, 8, ["label"])]),
|
|
1608
|
-
_: 1
|
|
1609
|
-
}, 8, ["modelValue", "predefined-range"]), a("div", cs, [m(Pe, {
|
|
1610
|
-
modelValue: fe.value,
|
|
1611
|
-
"onUpdate:modelValue": s[2] || (s[2] = (f) => fe.value = f),
|
|
1612
|
-
items: Nt.value,
|
|
1613
|
-
multiple: "",
|
|
1614
|
-
variant: "dark",
|
|
1615
|
-
placeholder: c(o)("auditLog.filter.user_placeholder"),
|
|
1616
|
-
"selected-prefix": c(o)("auditLog.filter.selected_user_prefix"),
|
|
1617
|
-
"chip-icon": "account_circle"
|
|
1618
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", fs, [m(Pe, {
|
|
1619
|
-
modelValue: G.value,
|
|
1620
|
-
"onUpdate:modelValue": s[3] || (s[3] = (f) => G.value = f),
|
|
1621
|
-
items: Rt.value,
|
|
1622
|
-
"filter-fn": Kt,
|
|
1623
|
-
multiple: "",
|
|
1624
|
-
variant: "dark",
|
|
1625
|
-
placeholder: c(o)("auditLog.filter.subject_placeholder"),
|
|
1626
|
-
"selected-prefix": c(o)("auditLog.filter.selected_subject_prefix"),
|
|
1627
|
-
"chip-icon": "badge"
|
|
1628
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", ms, [m(Pe, {
|
|
1629
|
-
modelValue: ee.value,
|
|
1630
|
-
"onUpdate:modelValue": s[4] || (s[4] = (f) => ee.value = f),
|
|
1631
|
-
items: Bt.value,
|
|
1632
|
-
multiple: "",
|
|
1633
|
-
variant: "dark",
|
|
1634
|
-
placeholder: c(o)("auditLog.filter.action_placeholder"),
|
|
1635
|
-
"selected-prefix": c(o)("auditLog.filter.selected_action_prefix"),
|
|
1636
|
-
searchable: !1
|
|
1637
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", vs, [m(Pe, {
|
|
1638
|
-
modelValue: Z.value,
|
|
1639
|
-
"onUpdate:modelValue": s[5] || (s[5] = (f) => Z.value = f),
|
|
1640
|
-
items: Yt.value,
|
|
1641
|
-
multiple: "",
|
|
1642
|
-
variant: "dark",
|
|
1643
|
-
placeholder: c(o)("auditLog.filter.status_placeholder"),
|
|
1644
|
-
"selected-prefix": c(o)("auditLog.filter.selected_status_prefix"),
|
|
1645
|
-
searchable: !1,
|
|
1646
|
-
"chip-icon": "check_circle"
|
|
1647
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), m(Ce, {
|
|
1648
|
-
modelValue: Be.value,
|
|
1649
|
-
"onUpdate:modelValue": s[6] || (s[6] = (f) => Be.value = f),
|
|
1650
|
-
class: "ml-auto w-[280px]",
|
|
1651
|
-
placeholder: c(o)("auditLog.search.placeholder")
|
|
1652
|
-
}, null, 8, ["modelValue", "placeholder"])])]), m(Co, null, {
|
|
1653
|
-
default: B(() => [a("div", ps, [m(Po, {
|
|
1654
|
-
"is-loading": g.value,
|
|
1655
|
-
"is-empty": h.value.length === 0,
|
|
1656
|
-
title: c(o)("auditLog.noData.title"),
|
|
1657
|
-
subtitle: c(o)("auditLog.noData.subtitle")
|
|
1658
|
-
}, {
|
|
1659
|
-
default: B(() => [(v(), we(_e, {
|
|
1660
|
-
key: _t.value,
|
|
1661
|
-
"column-defs": lo,
|
|
1662
|
-
"row-data": h.value,
|
|
1663
|
-
"page-size": ke,
|
|
1664
|
-
"page-count": lt.value,
|
|
1665
|
-
"row-count": Re.value,
|
|
1666
|
-
"fetch-fn": io,
|
|
1667
|
-
"hide-footer": lt.value <= 1,
|
|
1668
|
-
loading: g.value,
|
|
1669
|
-
"expanded-state": O.value,
|
|
1670
|
-
"get-row-can-expand": ao,
|
|
1671
|
-
"get-sub-row": no,
|
|
1672
|
-
"pin-header-row": "",
|
|
1673
|
-
class: "audit-log-list-table cursor-pointer",
|
|
1674
|
-
"onUpdate:expandedState": s[7] || (s[7] = (f) => O.value = f),
|
|
1675
|
-
onRowClick: s[8] || (s[8] = (f) => uo(f.original))
|
|
1676
|
-
}, null, 8, ["row-data", "page-count", "row-count", "hide-footer", "loading", "expanded-state"]))]),
|
|
1677
|
-
_: 1
|
|
1678
|
-
}, 8, ["is-loading", "is-empty", "title", "subtitle"])])]),
|
|
1679
|
-
_: 1
|
|
1680
|
-
})])]),
|
|
1681
|
-
_: 1
|
|
1682
|
-
}, 8, ["heading"]), m(xe, {
|
|
1683
|
-
header: c(o)("auditLog.detail.header"),
|
|
1684
|
-
"model-value": C.value,
|
|
1685
|
-
"max-width": 768,
|
|
1686
|
-
"dismiss-away": "",
|
|
1687
|
-
"onUpdate:modelValue": s[9] || (s[9] = (f) => {
|
|
1688
|
-
f || co();
|
|
1689
|
-
})
|
|
1690
|
-
}, {
|
|
1691
|
-
default: B(() => [i.value ? (v(), b("div", gs, [a("div", hs, [a("div", ys, [a("p", bs, l(Xt(i.value)), 1), i.value.traceId ? (v(), b("p", _s, " Trace ID: " + l(i.value.traceId), 1)) : j("", !0)]), a("div", xs, [m($, {
|
|
1692
|
-
variant: ht(i.value.outcome),
|
|
1693
|
-
label: He(i.value.outcome),
|
|
1694
|
-
compact: ""
|
|
1695
|
-
}, null, 8, ["variant", "label"]), c(At)(i.value) ? (v(), we(Xe, {
|
|
1696
|
-
key: 0,
|
|
1697
|
-
variant: "plain",
|
|
1698
|
-
placement: "top"
|
|
1699
|
-
}, {
|
|
1700
|
-
content: B(() => [Ve(l(c(o)("auditLog.operation.partialFailure")), 1)]),
|
|
1701
|
-
default: B(() => [m(Te, {
|
|
1702
|
-
name: "error",
|
|
1703
|
-
size: "sm",
|
|
1704
|
-
class: "cursor-help text-fm-color-typo-error"
|
|
1705
|
-
})]),
|
|
1706
|
-
_: 1
|
|
1707
|
-
})) : j("", !0)])]), a("div", Ls, [a("div", Ss, [a("div", null, [a("p", ks, l(c(o)("auditLog.detail.date")), 1), a("p", ws, l(mt(i.value.timestamp)), 1)]), a("div", null, [a("p", Is, l(c(o)("auditLog.detail.user")), 1), a("p", As, l(be(i.value)), 1)]), a("div", null, [a("p", Fs, l(c(o)("auditLog.detail.email")), 1), a("p", Ms, l(Gt(i.value)), 1)]), i.value.field ? (v(), b("div", Os, [a("p", Ds, l(c(o)("auditLog.detail.field")), 1), a("p", js, l(i.value.field), 1)])) : j("", !0), a("div", null, [a("p", Cs, l(c(o)("auditLog.detail.business")), 1), a("p", Ts, l(i.value.businessId || "-"), 1)]), a("div", null, [a("p", Vs, l(c(o)("auditLog.detail.restaurant")), 1), a("p", Ps, l(i.value.restaurantId || "-"), 1)])])]), a("div", Es, [a("div", $s, [a("p", Ns, l(c(o)("auditLog.detail.eventDetails")), 1)]), s[12] || (s[12] = a("hr", {
|
|
1708
|
-
class: "border-fm-color-border-default"
|
|
1709
|
-
}, null, -1)), a("div", Us, [a("div", null, [a("p", Rs, l(c(o)("auditLog.detail.actionDescription")), 1), a("p", Ks, l(i.value.metadata.operationLabel || "-"), 1)])])]), a("div", Bs, [a("div", Ys, [a("p", zs, l(c(o)("auditLog.detail.metadata")), 1)]), s[13] || (s[13] = a("hr", {
|
|
1710
|
-
class: "border-fm-color-border-default"
|
|
1711
|
-
}, null, -1)), a("div", qs, [a("div", null, [a("p", Js, l(c(o)("auditLog.detail.resolvedFrom")), 1), a("p", Hs, l(Qt(i.value.metadata.resolvedFrom)), 1)]), (i.value.metadata.resolvedFrom === "permissionSet" || i.value.metadata.resolvedFrom === "systemPermissionSet") && (i.value.metadata.permissionSetName || i.value.metadata.permissionSetId) ? (v(), b("div", Ws, [a("p", Gs, l(c(o)("auditLog.detail.permissionSet")), 1), i.value.metadata.permissionSetName ? (v(), b("p", Xs, l(i.value.metadata.permissionSetName), 1)) : j("", !0), i.value.metadata.permissionSetId ? (v(), b("p", Qs, l(i.value.metadata.permissionSetId), 1)) : j("", !0)])) : j("", !0), i.value.metadata.reason ? (v(), b("div", Zs, [a("p", ea, l(c(o)("auditLog.detail.reason")), 1), a("p", ta, l(i.value.metadata.reason), 1)])) : j("", !0), a("div", null, [a("p", oa, l(c(o)("auditLog.detail.requestMethod")), 1), a("p", sa, l(Zt(i.value)), 1)]), a("div", null, [a("p", aa, l(c(o)("auditLog.detail.requestPath")), 1), a("p", na, l(i.value.metadata.requestPath || "-"), 1)]), i.value.metadata.trace && i.value.metadata.trace.length > 0 ? (v(), b("div", la, [a("p", ra, l(c(o)("auditLog.detail.permissionTrace")), 1), a("ol", ia, [(v(!0), b(q, null, ae(i.value.metadata.trace, (f, P) => (v(), b("li", {
|
|
1712
|
-
key: P,
|
|
1713
|
-
class: "flex items-center gap-6"
|
|
1714
|
-
}, [a("span", ua, l(P + 1), 1), a("span", da, l(f), 1), P < i.value.metadata.trace.length - 1 ? (v(), b("span", ca, "→")) : j("", !0)]))), 128))])])) : j("", !0), I.value ? (v(), b("div", fa, [a("p", ma, l(c(o)("auditLog.detail.requestBody")), 1), a("pre", va, l(I.value), 1)])) : j("", !0)])])])) : j("", !0)]),
|
|
1715
|
-
_: 1
|
|
1716
|
-
}, 8, ["header", "model-value"]), m(xe, {
|
|
1717
|
-
header: c(o)("auditLog.operation.sheetHeader"),
|
|
1718
|
-
"model-value": V.value,
|
|
1719
|
-
"max-width": 768,
|
|
1720
|
-
"dismiss-away": "",
|
|
1721
|
-
"onUpdate:modelValue": s[11] || (s[11] = (f) => {
|
|
1722
|
-
f || mo();
|
|
1723
|
-
})
|
|
1724
|
-
}, {
|
|
1725
|
-
default: B(() => [k.value ? (v(), b("div", pa, [a("div", ga, [a("div", ha, [a("p", ya, l(gt(k.value)), 1), k.value.entityId ? (v(), b("p", ba, l(k.value.entityId), 1)) : j("", !0)]), m($, {
|
|
1726
|
-
variant: k.value.status === "failed" ? "critical" : "success",
|
|
1727
|
-
label: k.value.status === "failed" ? c(o)("auditLog.outcome.failed") : c(o)("auditLog.outcome.success"),
|
|
1728
|
-
compact: ""
|
|
1729
|
-
}, null, 8, ["variant", "label"])]), a("div", _a, [a("div", xa, [a("div", null, [a("p", La, l(c(o)("auditLog.detail.date")), 1), a("p", Sa, l(mt(k.value.timestamp)), 1)]), k.value.entityId ? (v(), b("div", ka, [a("p", wa, l(c(o)("auditLog.operation.entity")), 1), a("p", Ia, l(k.value.entityId), 1)])) : j("", !0), k.value.durationMs !== void 0 ? (v(), b("div", Aa, [a("p", Fa, l(c(o)("auditLog.operation.duration")), 1), a("p", Ma, l(c(o)("auditLog.operation.durationValue", {
|
|
1730
|
-
ms: k.value.durationMs
|
|
1731
|
-
})), 1)])) : j("", !0)])]), k.value.status === "failed" ? (v(), b("div", Oa, [a("p", Da, l(c(o)("auditLog.operation.error")), 1), a("p", ja, l(k.value.errorMessage || "-"), 1)])) : j("", !0), a("div", Ca, [a("div", Ta, [a("p", Va, l(c(o)("auditLog.operation.changes")), 1)]), s[16] || (s[16] = a("hr", {
|
|
1732
|
-
class: "border-fm-color-border-default"
|
|
1733
|
-
}, null, -1)), a("div", Pa, [E.value.length ? (v(), b("div", Ea, [(v(!0), b(q, null, ae(E.value, (f, P) => (v(), b("div", {
|
|
1734
|
-
key: P,
|
|
1735
|
-
class: "space-y-4 py-8 first:pt-0 last:pb-0"
|
|
1736
|
-
}, [a("div", $a, [m($, {
|
|
1737
|
-
variant: at(f.type),
|
|
1738
|
-
label: J(f.type),
|
|
1739
|
-
compact: ""
|
|
1740
|
-
}, null, 8, ["variant", "label"]), a("span", Na, l(he(f)), 1)]), a("p", Ua, [f.type === "add" ? (v(), b("span", Ra, l(f.afterDisplay), 1)) : f.type === "remove" ? (v(), b("span", Ka, l(f.beforeDisplay), 1)) : (v(), b(q, {
|
|
1741
|
-
key: 2
|
|
1742
|
-
}, [a("span", Ba, l(f.beforeDisplay), 1), s[14] || (s[14] = a("span", {
|
|
1743
|
-
class: "text-fm-color-typo-secondary"
|
|
1744
|
-
}, " → ", -1)), a("span", Ya, l(f.afterDisplay), 1)], 64))])]))), 128))])) : nt.value.length ? (v(), b("div", za, [(v(!0), b(q, null, ae(nt.value, (f) => (v(), b("div", {
|
|
1745
|
-
key: f.groupKey,
|
|
1746
|
-
class: "space-y-4 py-8 first:pt-0 last:pb-0"
|
|
1747
|
-
}, [a("div", qa, [m($, {
|
|
1748
|
-
variant: ce(f.type),
|
|
1749
|
-
label: ne(f.type),
|
|
1750
|
-
compact: ""
|
|
1751
|
-
}, null, 8, ["variant", "label"]), a("span", Ja, l(f.displayKey), 1)]), a("div", Ha, [(v(!0), b(q, null, ae(f.rows, (P) => (v(), b("p", {
|
|
1752
|
-
key: P.path,
|
|
1753
|
-
class: "break-all font-mono text-xs"
|
|
1754
|
-
}, [P.type === "added" ? (v(), b("span", Wa, l(P.after ?? "—"), 1)) : P.type === "removed" ? (v(), b("span", Ga, l(P.before ?? "—"), 1)) : (v(), b(q, {
|
|
1755
|
-
key: 2
|
|
1756
|
-
}, [a("span", Xa, l(P.before ?? "—"), 1), s[15] || (s[15] = a("span", {
|
|
1757
|
-
class: "text-fm-color-typo-secondary"
|
|
1758
|
-
}, " → ", -1)), a("span", Qa, l(P.after ?? "—"), 1)], 64))]))), 128))])]))), 128))])) : (v(), b("p", Za, l(c(o)("auditLog.operation.noChanges")), 1))])]), T.value || Y.value ? (v(), b("div", en, [a("button", {
|
|
1759
|
-
type: "button",
|
|
1760
|
-
class: "flex w-full items-center justify-between p-12 text-left",
|
|
1761
|
-
onClick: s[10] || (s[10] = (f) => U.value = !U.value)
|
|
1762
|
-
}, [a("p", tn, l(c(o)("auditLog.operation.showData")), 1), m(Te, {
|
|
1763
|
-
name: "keyboard_arrow_down",
|
|
1764
|
-
class: Do(["shrink-0 transition-transform", U.value ? "rotate-180" : ""])
|
|
1765
|
-
}, null, 8, ["class"])]), U.value ? (v(), b(q, {
|
|
1766
|
-
key: 0
|
|
1767
|
-
}, [s[17] || (s[17] = a("hr", {
|
|
1768
|
-
class: "border-fm-color-border-default"
|
|
1769
|
-
}, null, -1)), a("div", on, [T.value ? (v(), b("div", sn, [a("p", an, l(c(o)("auditLog.operation.before")), 1), a("pre", nn, l(T.value), 1)])) : j("", !0), Y.value ? (v(), b("div", ln, [a("p", rn, l(c(o)("auditLog.operation.after")), 1), a("pre", un, l(Y.value), 1)])) : j("", !0)])], 64)) : j("", !0)])) : j("", !0)])) : j("", !0)]),
|
|
1770
|
-
_: 1
|
|
1771
|
-
}, 8, ["header", "model-value"])], 64);
|
|
1772
|
-
};
|
|
1773
|
-
}
|
|
1774
|
-
}), An = /* @__PURE__ */ To(fn, [["__scopeId", "data-v-f7aebfad"]]);
|
|
1775
|
-
export {
|
|
1776
|
-
An as default
|
|
1777
|
-
};
|