@myrjfa/ui 2.1.9 → 2.2.0
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/chat/ChatMain.d.ts +1 -1
- package/dist/chat/ChatMain.d.ts.map +1 -1
- package/dist/chat/ChatMain.js +3 -3
- package/dist/chat/ChatSidebar.d.ts +1 -1
- package/dist/chat/ChatSidebar.d.ts.map +1 -1
- package/dist/chat/ConversationList.d.ts +1 -1
- package/dist/chat/ConversationList.d.ts.map +1 -1
- package/dist/chat/ConversationList.js +1 -1
- package/dist/chat/ExpensePanel.js +1 -1
- package/dist/chat/MessageBubble.d.ts +1 -1
- package/dist/chat/MessageBubble.d.ts.map +1 -1
- package/dist/chat/MessageInput.js +1 -1
- package/dist/chat/MilestonePanel.js +1 -1
- package/dist/chat/components/SplitInputs.d.ts +1 -1
- package/dist/chat/components/SplitInputs.d.ts.map +1 -1
- package/dist/chat/components/SplitTypeSelector.d.ts +1 -1
- package/dist/chat/components/SplitTypeSelector.d.ts.map +1 -1
- package/dist/chat/dialogs/AddMemberDialog.d.ts +1 -1
- package/dist/chat/dialogs/AddMemberDialog.d.ts.map +1 -1
- package/dist/chat/dialogs/AddMemberDialog.js +1 -1
- package/dist/chat/dialogs/ExpenseAnalyticsDialog.js +1 -1
- package/dist/chat/dialogs/GroupInfoDialog.d.ts +1 -1
- package/dist/chat/dialogs/GroupInfoDialog.d.ts.map +1 -1
- package/dist/chat/dialogs/GroupInfoDialog.js +1 -1
- package/dist/chat/dialogs/GroupInfoViewDialog.d.ts +1 -1
- package/dist/chat/dialogs/GroupInfoViewDialog.d.ts.map +1 -1
- package/dist/chat/dialogs/NewChatDialog.js +2 -2
- package/dist/chat/dialogs/NewGroupDialog.js +2 -2
- package/dist/chat/dialogs/ParticipantsDialog.d.ts +1 -1
- package/dist/chat/dialogs/ParticipantsDialog.d.ts.map +1 -1
- package/dist/chat/dialogs/ParticipantsDialog.js +1 -1
- package/dist/components/CityAutocomplete.d.ts +5 -0
- package/dist/components/CityAutocomplete.d.ts.map +1 -0
- package/dist/components/CityAutocomplete.js +112 -0
- package/dist/components/CreateListingDropdown.d.ts +5 -0
- package/dist/components/CreateListingDropdown.d.ts.map +1 -0
- package/dist/components/CreateListingDropdown.js +21 -0
- package/dist/components/DestinationAutocomplete.d.ts +11 -0
- package/dist/components/DestinationAutocomplete.d.ts.map +1 -0
- package/dist/components/DestinationAutocomplete.js +24 -0
- package/dist/components/StateAutocomplete.d.ts +10 -0
- package/dist/components/StateAutocomplete.d.ts.map +1 -0
- package/dist/components/StateAutocomplete.js +34 -0
- package/dist/components/admin/AdminBookingRegistrationsList.d.ts +5 -0
- package/dist/components/admin/AdminBookingRegistrationsList.d.ts.map +1 -0
- package/dist/components/admin/AdminBookingRegistrationsList.js +69 -0
- package/dist/components/admin/AdminListingActionsWrapper.d.ts +9 -0
- package/dist/components/admin/AdminListingActionsWrapper.d.ts.map +1 -0
- package/dist/components/admin/AdminListingActionsWrapper.js +200 -0
- package/dist/components/ads/ActivateAdPlacementButton.d.ts +6 -0
- package/dist/components/ads/ActivateAdPlacementButton.d.ts.map +1 -0
- package/dist/components/ads/ActivateAdPlacementButton.js +27 -0
- package/dist/components/ads/AdOfferCard.d.ts +6 -0
- package/dist/components/ads/AdOfferCard.d.ts.map +1 -0
- package/dist/components/ads/AdOfferCard.js +15 -0
- package/dist/components/adventure/AdventureAvailabilityPlanner.d.ts +17 -0
- package/dist/components/adventure/AdventureAvailabilityPlanner.d.ts.map +1 -0
- package/dist/components/adventure/AdventureAvailabilityPlanner.js +106 -0
- package/dist/components/adventure/AdventureQueryCard.d.ts +5 -0
- package/dist/components/adventure/AdventureQueryCard.d.ts.map +1 -0
- package/dist/components/adventure/AdventureQueryCard.js +65 -0
- package/dist/components/adventure/AdventureSlotBuilder.d.ts +41 -0
- package/dist/components/adventure/AdventureSlotBuilder.d.ts.map +1 -0
- package/dist/components/adventure/AdventureSlotBuilder.js +146 -0
- package/dist/components/booking/booking-form.d.ts +39 -0
- package/dist/components/booking/booking-form.d.ts.map +1 -0
- package/dist/components/booking/booking-form.js +824 -0
- package/dist/components/brand/BrandPageView.d.ts +8 -0
- package/dist/components/brand/BrandPageView.d.ts.map +1 -0
- package/dist/components/brand/BrandPageView.js +97 -0
- package/dist/components/companion/AnonymousChat.d.ts +22 -0
- package/dist/components/companion/AnonymousChat.d.ts.map +1 -0
- package/dist/components/companion/AnonymousChat.js +24 -0
- package/dist/components/companion/SwipeCard.d.ts +25 -0
- package/dist/components/companion/SwipeCard.d.ts.map +1 -0
- package/dist/components/companion/SwipeCard.js +58 -0
- package/dist/components/create-flow/ConfirmDiscardDialog.d.ts +11 -0
- package/dist/components/create-flow/ConfirmDiscardDialog.d.ts.map +1 -0
- package/dist/components/create-flow/ConfirmDiscardDialog.js +14 -0
- package/dist/components/create-flow/EntityEditLoadingState.d.ts +2 -0
- package/dist/components/create-flow/EntityEditLoadingState.d.ts.map +1 -0
- package/dist/components/create-flow/EntityEditLoadingState.js +6 -0
- package/dist/components/create-flow/EntityFormCompletionState.d.ts +12 -0
- package/dist/components/create-flow/EntityFormCompletionState.d.ts.map +1 -0
- package/dist/components/create-flow/EntityFormCompletionState.js +10 -0
- package/dist/components/create-flow/EntityFormHeader.d.ts +9 -0
- package/dist/components/create-flow/EntityFormHeader.d.ts.map +1 -0
- package/dist/components/create-flow/EntityFormHeader.js +7 -0
- package/dist/components/create-flow/EntityFormPageFrame.d.ts +10 -0
- package/dist/components/create-flow/EntityFormPageFrame.d.ts.map +1 -0
- package/dist/components/create-flow/EntityFormPageFrame.js +10 -0
- package/dist/components/create-flow/ImageUploadStep.d.ts +15 -0
- package/dist/components/create-flow/ImageUploadStep.d.ts.map +1 -0
- package/dist/components/create-flow/ImageUploadStep.js +11 -0
- package/dist/components/create-flow/ImageUploader.d.ts +30 -0
- package/dist/components/create-flow/ImageUploader.d.ts.map +1 -0
- package/dist/components/create-flow/ImageUploader.js +193 -0
- package/dist/components/create-flow/MultiStepWizard.d.ts +25 -0
- package/dist/components/create-flow/MultiStepWizard.d.ts.map +1 -0
- package/dist/components/create-flow/MultiStepWizard.js +31 -0
- package/dist/components/create-flow/ReviewConfirmationCard.d.ts +8 -0
- package/dist/components/create-flow/ReviewConfirmationCard.d.ts.map +1 -0
- package/dist/components/create-flow/ReviewConfirmationCard.js +5 -0
- package/dist/components/create-flow/ReviewMetricGrid.d.ts +15 -0
- package/dist/components/create-flow/ReviewMetricGrid.d.ts.map +1 -0
- package/dist/components/create-flow/ReviewMetricGrid.js +8 -0
- package/dist/components/create-flow/TemplateSelectionDialog.d.ts +17 -0
- package/dist/components/create-flow/TemplateSelectionDialog.d.ts.map +1 -0
- package/dist/components/create-flow/TemplateSelectionDialog.js +7 -0
- package/dist/components/enquiry/EnquiryFormParts.d.ts +40 -0
- package/dist/components/enquiry/EnquiryFormParts.d.ts.map +1 -0
- package/dist/components/enquiry/EnquiryFormParts.js +29 -0
- package/dist/components/form-sections/FaqSection.d.ts +24 -0
- package/dist/components/form-sections/FaqSection.d.ts.map +1 -0
- package/dist/components/form-sections/FaqSection.js +17 -0
- package/dist/components/form-sections/ImageUploadSection.d.ts +12 -0
- package/dist/components/form-sections/ImageUploadSection.d.ts.map +1 -0
- package/dist/components/form-sections/ImageUploadSection.js +8 -0
- package/dist/components/form-sections/OpportunityBasicsSection.d.ts +8 -0
- package/dist/components/form-sections/OpportunityBasicsSection.d.ts.map +1 -0
- package/dist/components/form-sections/OpportunityBasicsSection.js +26 -0
- package/dist/components/form-sections/OpportunityDetailsSection.d.ts +18 -0
- package/dist/components/form-sections/OpportunityDetailsSection.d.ts.map +1 -0
- package/dist/components/form-sections/OpportunityDetailsSection.js +10 -0
- package/dist/components/form-sections/OpportunityTypeSection.d.ts +7 -0
- package/dist/components/form-sections/OpportunityTypeSection.d.ts.map +1 -0
- package/dist/components/form-sections/OpportunityTypeSection.js +15 -0
- package/dist/components/form-sections/PackageDetailsSection.d.ts +22 -0
- package/dist/components/form-sections/PackageDetailsSection.d.ts.map +1 -0
- package/dist/components/form-sections/PackageDetailsSection.js +20 -0
- package/dist/components/form-sections/PackageItinerarySection.d.ts +21 -0
- package/dist/components/form-sections/PackageItinerarySection.d.ts.map +1 -0
- package/dist/components/form-sections/PackageItinerarySection.js +112 -0
- package/dist/components/form-sections/PackagePricingSection.d.ts +8 -0
- package/dist/components/form-sections/PackagePricingSection.d.ts.map +1 -0
- package/dist/components/form-sections/PackagePricingSection.js +11 -0
- package/dist/components/form-sections/PackageReviewSection.d.ts +12 -0
- package/dist/components/form-sections/PackageReviewSection.d.ts.map +1 -0
- package/dist/components/form-sections/PackageReviewSection.js +26 -0
- package/dist/components/form-sections/RentalBasicsSection.d.ts +12 -0
- package/dist/components/form-sections/RentalBasicsSection.d.ts.map +1 -0
- package/dist/components/form-sections/RentalBasicsSection.js +91 -0
- package/dist/components/form-sections/RentalCapacitySection.d.ts +9 -0
- package/dist/components/form-sections/RentalCapacitySection.d.ts.map +1 -0
- package/dist/components/form-sections/RentalCapacitySection.js +23 -0
- package/dist/components/form-sections/RentalLocationSection.d.ts +10 -0
- package/dist/components/form-sections/RentalLocationSection.d.ts.map +1 -0
- package/dist/components/form-sections/RentalLocationSection.js +41 -0
- package/dist/components/form-sections/RentalPhotosSection.d.ts +8 -0
- package/dist/components/form-sections/RentalPhotosSection.d.ts.map +1 -0
- package/dist/components/form-sections/RentalPhotosSection.js +7 -0
- package/dist/components/form-sections/RentalReviewSection.d.ts +10 -0
- package/dist/components/form-sections/RentalReviewSection.d.ts.map +1 -0
- package/dist/components/form-sections/RentalReviewSection.js +27 -0
- package/dist/components/form-sections/RentalRulesSection.d.ts +7 -0
- package/dist/components/form-sections/RentalRulesSection.d.ts.map +1 -0
- package/dist/components/form-sections/RentalRulesSection.js +10 -0
- package/dist/components/form-sections/RentalSpecsSection.d.ts +7 -0
- package/dist/components/form-sections/RentalSpecsSection.d.ts.map +1 -0
- package/dist/components/form-sections/RentalSpecsSection.js +10 -0
- package/dist/components/host-dashboard/HostCalendar.d.ts +8 -0
- package/dist/components/host-dashboard/HostCalendar.d.ts.map +1 -0
- package/dist/components/host-dashboard/HostCalendar.js +43 -0
- package/dist/components/host-dashboard/HostCalendarGrid.d.ts +34 -0
- package/dist/components/host-dashboard/HostCalendarGrid.d.ts.map +1 -0
- package/dist/components/host-dashboard/HostCalendarGrid.js +30 -0
- package/dist/components/host-dashboard/HostListingMultiSelect.d.ts +12 -0
- package/dist/components/host-dashboard/HostListingMultiSelect.d.ts.map +1 -0
- package/dist/components/host-dashboard/HostListingMultiSelect.js +24 -0
- package/dist/components/host-dashboard/HostManageCalendarShell.d.ts +17 -0
- package/dist/components/host-dashboard/HostManageCalendarShell.d.ts.map +1 -0
- package/dist/components/host-dashboard/HostManageCalendarShell.js +5 -0
- package/dist/components/host-dashboard/HostSidebarNavigation.d.ts +2 -0
- package/dist/components/host-dashboard/HostSidebarNavigation.d.ts.map +1 -0
- package/dist/components/host-dashboard/HostSidebarNavigation.js +262 -0
- package/dist/components/host-dashboard/ManageFeatureSwitcher.d.ts +15 -0
- package/dist/components/host-dashboard/ManageFeatureSwitcher.d.ts.map +1 -0
- package/dist/components/host-dashboard/ManageFeatureSwitcher.js +43 -0
- package/dist/components/host-dashboard/PageHeader.d.ts +14 -0
- package/dist/components/host-dashboard/PageHeader.d.ts.map +1 -0
- package/dist/components/host-dashboard/PageHeader.js +8 -0
- package/dist/components/host-dashboard/PlaceholderPage.d.ts +4 -0
- package/dist/components/host-dashboard/PlaceholderPage.d.ts.map +1 -0
- package/dist/components/host-dashboard/PlaceholderPage.js +9 -0
- package/dist/components/host-dashboard/StatCard.d.ts +15 -0
- package/dist/components/host-dashboard/StatCard.d.ts.map +1 -0
- package/dist/components/host-dashboard/StatCard.js +38 -0
- package/dist/components/layout/AppProviders.d.ts +5 -0
- package/dist/components/layout/AppProviders.d.ts.map +1 -0
- package/dist/components/layout/AppProviders.js +11 -0
- package/dist/components/layout/PublicRouteLayout.d.ts +5 -0
- package/dist/components/layout/PublicRouteLayout.d.ts.map +1 -0
- package/dist/components/layout/PublicRouteLayout.js +5 -0
- package/dist/components/layout/PublicShell.d.ts +5 -0
- package/dist/components/layout/PublicShell.d.ts.map +1 -0
- package/dist/components/layout/PublicShell.js +5 -0
- package/dist/components/location/LocationPicker.d.ts +27 -0
- package/dist/components/location/LocationPicker.d.ts.map +1 -0
- package/dist/components/location/LocationPicker.js +415 -0
- package/dist/components/location/LocationPreview.d.ts +11 -0
- package/dist/components/location/LocationPreview.d.ts.map +1 -0
- package/dist/components/location/LocationPreview.js +12 -0
- package/dist/components/location/MapPicker.d.ts +9 -0
- package/dist/components/location/MapPicker.d.ts.map +1 -0
- package/dist/components/location/MapPicker.js +40 -0
- package/dist/components/location/MapPreview.d.ts +8 -0
- package/dist/components/location/MapPreview.d.ts.map +1 -0
- package/dist/components/location/MapPreview.js +17 -0
- package/dist/components/location/PlaceLinkInline.d.ts +14 -0
- package/dist/components/location/PlaceLinkInline.d.ts.map +1 -0
- package/dist/components/location/PlaceLinkInline.js +30 -0
- package/dist/components/location/leafletMap.d.ts +8 -0
- package/dist/components/location/leafletMap.d.ts.map +1 -0
- package/dist/components/location/leafletMap.js +74 -0
- package/dist/components/ui/GuestOrLoginDialog.d.ts +11 -0
- package/dist/components/ui/GuestOrLoginDialog.d.ts.map +1 -0
- package/dist/components/ui/GuestOrLoginDialog.js +19 -0
- package/dist/components/ui/ImageGalleryViewer.d.ts +10 -0
- package/dist/components/ui/ImageGalleryViewer.d.ts.map +1 -0
- package/dist/components/ui/ImageGalleryViewer.js +59 -0
- package/dist/components/ui/LocationInput.d.ts +12 -0
- package/dist/components/ui/LocationInput.d.ts.map +1 -0
- package/dist/components/ui/LocationInput.js +39 -0
- package/dist/components/ui/PropertyGalleryClient.d.ts +8 -0
- package/dist/components/ui/PropertyGalleryClient.d.ts.map +1 -0
- package/dist/components/ui/PropertyGalleryClient.js +22 -0
- package/dist/components/ui/calendar.d.ts +9 -0
- package/dist/components/ui/calendar.d.ts.map +1 -0
- package/dist/components/ui/calendar.js +75 -0
- package/dist/components/ui/dashboard/admin-adventures-table.d.ts +12 -0
- package/dist/components/ui/dashboard/admin-adventures-table.d.ts.map +1 -0
- package/dist/components/ui/dashboard/admin-adventures-table.js +94 -0
- package/dist/components/ui/dashboard/admin-blogs-table.d.ts +11 -0
- package/dist/components/ui/dashboard/admin-blogs-table.d.ts.map +1 -0
- package/dist/components/ui/dashboard/admin-blogs-table.js +58 -0
- package/dist/components/ui/dashboard/admin-opportunities-table.d.ts +20 -0
- package/dist/components/ui/dashboard/admin-opportunities-table.d.ts.map +1 -0
- package/dist/components/ui/dashboard/admin-opportunities-table.js +133 -0
- package/dist/components/ui/dashboard/admin-rentals-table.d.ts +12 -0
- package/dist/components/ui/dashboard/admin-rentals-table.d.ts.map +1 -0
- package/dist/components/ui/dashboard/admin-rentals-table.js +85 -0
- package/dist/components/ui/dashboard/admin-travel-package-table.d.ts +16 -0
- package/dist/components/ui/dashboard/admin-travel-package-table.d.ts.map +1 -0
- package/dist/components/ui/dashboard/admin-travel-package-table.js +100 -0
- package/dist/components/ui/dashboard/adventures-table.d.ts +16 -0
- package/dist/components/ui/dashboard/adventures-table.d.ts.map +1 -0
- package/dist/components/ui/dashboard/adventures-table.js +151 -0
- package/dist/components/ui/dashboard/approver-applications-table.d.ts +13 -0
- package/dist/components/ui/dashboard/approver-applications-table.d.ts.map +1 -0
- package/dist/components/ui/dashboard/approver-applications-table.js +85 -0
- package/dist/components/ui/dashboard/approver-package-enquiries-table.d.ts +11 -0
- package/dist/components/ui/dashboard/approver-package-enquiries-table.d.ts.map +1 -0
- package/dist/components/ui/dashboard/approver-package-enquiries-table.js +102 -0
- package/dist/components/ui/dashboard/archive-confirm-modal.d.ts +9 -0
- package/dist/components/ui/dashboard/archive-confirm-modal.d.ts.map +1 -0
- package/dist/components/ui/dashboard/archive-confirm-modal.js +6 -0
- package/dist/components/ui/dashboard/blogs-table.d.ts +10 -0
- package/dist/components/ui/dashboard/blogs-table.d.ts.map +1 -0
- package/dist/components/ui/dashboard/blogs-table.js +62 -0
- package/dist/components/ui/dashboard/bookings-table.d.ts +12 -0
- package/dist/components/ui/dashboard/bookings-table.d.ts.map +1 -0
- package/dist/components/ui/dashboard/bookings-table.js +160 -0
- package/dist/components/ui/dashboard/dashboard-page-shell.d.ts +7 -0
- package/dist/components/ui/dashboard/dashboard-page-shell.d.ts.map +1 -0
- package/dist/components/ui/dashboard/dashboard-page-shell.js +5 -0
- package/dist/components/ui/dashboard/data-table-shell.d.ts +18 -0
- package/dist/components/ui/dashboard/data-table-shell.d.ts.map +1 -0
- package/dist/components/ui/dashboard/data-table-shell.js +6 -0
- package/dist/components/ui/dashboard/delete-confirm-modal.d.ts +9 -0
- package/dist/components/ui/dashboard/delete-confirm-modal.d.ts.map +1 -0
- package/dist/components/ui/dashboard/delete-confirm-modal.js +6 -0
- package/dist/components/ui/dashboard/entity-list-page-state.d.ts +25 -0
- package/dist/components/ui/dashboard/entity-list-page-state.d.ts.map +1 -0
- package/dist/components/ui/dashboard/entity-list-page-state.js +17 -0
- package/dist/components/ui/dashboard/generic-entity-table.d.ts +36 -0
- package/dist/components/ui/dashboard/generic-entity-table.d.ts.map +1 -0
- package/dist/components/ui/dashboard/generic-entity-table.js +203 -0
- package/dist/components/ui/dashboard/opportunities-table.d.ts +17 -0
- package/dist/components/ui/dashboard/opportunities-table.d.ts.map +1 -0
- package/dist/components/ui/dashboard/opportunities-table.js +143 -0
- package/dist/components/ui/dashboard/rentals-table.d.ts +17 -0
- package/dist/components/ui/dashboard/rentals-table.d.ts.map +1 -0
- package/dist/components/ui/dashboard/rentals-table.js +155 -0
- package/dist/components/ui/dashboard/restore-confirm-modal.d.ts +9 -0
- package/dist/components/ui/dashboard/restore-confirm-modal.d.ts.map +1 -0
- package/dist/components/ui/dashboard/restore-confirm-modal.js +6 -0
- package/dist/components/ui/dashboard/stats-card.d.ts +6 -0
- package/dist/components/ui/dashboard/stats-card.d.ts.map +1 -0
- package/dist/components/ui/dashboard/stats-card.js +5 -0
- package/dist/components/ui/dashboard/travel-packages-table.d.ts +16 -0
- package/dist/components/ui/dashboard/travel-packages-table.d.ts.map +1 -0
- package/dist/components/ui/dashboard/travel-packages-table.js +134 -0
- package/dist/components/ui/dashboard/user-applications-table.d.ts +12 -0
- package/dist/components/ui/dashboard/user-applications-table.d.ts.map +1 -0
- package/dist/components/ui/dashboard/user-applications-table.js +79 -0
- package/dist/components/ui/loading-skeleton.d.ts +10 -0
- package/dist/components/ui/loading-skeleton.d.ts.map +1 -0
- package/dist/components/ui/loading-skeleton.js +49 -0
- package/dist/components/ui/misc/IosPwaNavBar.d.ts +8 -0
- package/dist/components/ui/misc/IosPwaNavBar.d.ts.map +1 -0
- package/dist/components/ui/misc/IosPwaNavBar.js +25 -0
- package/dist/components/ui/misc/document-upload-button.d.ts +10 -0
- package/dist/components/ui/misc/document-upload-button.d.ts.map +1 -0
- package/dist/components/ui/misc/document-upload-button.js +12 -0
- package/dist/components/ui/misc/empty-state.d.ts +9 -0
- package/dist/components/ui/misc/empty-state.d.ts.map +1 -0
- package/dist/components/ui/misc/empty-state.js +4 -0
- package/dist/components/ui/misc/image-cropper.d.ts +9 -0
- package/dist/components/ui/misc/image-cropper.d.ts.map +1 -0
- package/dist/components/ui/misc/image-cropper.js +28 -0
- package/dist/components/ui/misc/rental-tile.d.ts +6 -0
- package/dist/components/ui/misc/rental-tile.d.ts.map +1 -0
- package/dist/components/ui/misc/rental-tile.js +56 -0
- package/dist/components/ui/misc/skeleton-extras.d.ts +32 -0
- package/dist/components/ui/misc/skeleton-extras.d.ts.map +1 -0
- package/dist/components/ui/misc/skeleton-extras.js +58 -0
- package/dist/components/ui/misc/tile.d.ts +4 -0
- package/dist/components/ui/misc/tile.d.ts.map +1 -0
- package/dist/components/ui/misc/tile.js +45 -0
- package/dist/components/ui/misc/whatsapp-help.d.ts +7 -0
- package/dist/components/ui/misc/whatsapp-help.d.ts.map +1 -0
- package/dist/components/ui/misc/whatsapp-help.js +6 -0
- package/dist/components/ui/motion.d.ts +14 -0
- package/dist/components/ui/motion.d.ts.map +1 -0
- package/dist/components/ui/motion.js +17 -0
- package/dist/components/ui/trippeaze/breadcrumb-trail.d.ts +10 -0
- package/dist/components/ui/trippeaze/breadcrumb-trail.d.ts.map +1 -0
- package/dist/components/ui/trippeaze/breadcrumb-trail.js +15 -0
- package/dist/components/ui/trippeaze/chip-tabs.d.ts +13 -0
- package/dist/components/ui/trippeaze/chip-tabs.d.ts.map +1 -0
- package/dist/components/ui/trippeaze/chip-tabs.js +6 -0
- package/dist/components/ui/trippeaze/page-shell.d.ts +22 -0
- package/dist/components/ui/trippeaze/page-shell.d.ts.map +1 -0
- package/dist/components/ui/trippeaze/page-shell.js +15 -0
- package/dist/components/ui/trippeaze/search-input.d.ts +5 -0
- package/dist/components/ui/trippeaze/search-input.d.ts.map +1 -0
- package/dist/components/ui/trippeaze/search-input.js +7 -0
- package/dist/components/user-dashboard/UserDashboardShellSidebar.d.ts +2 -0
- package/dist/components/user-dashboard/UserDashboardShellSidebar.d.ts.map +1 -0
- package/dist/components/user-dashboard/UserDashboardShellSidebar.js +17 -0
- package/dist/components/user-dashboard/UserSidebarNav.d.ts +2 -0
- package/dist/components/user-dashboard/UserSidebarNav.d.ts.map +1 -0
- package/dist/components/user-dashboard/UserSidebarNav.js +67 -0
- package/dist/dashboard/action-buttons.d.ts +2 -1
- package/dist/dashboard/action-buttons.d.ts.map +1 -1
- package/dist/dashboard/action-buttons.js +18 -11
- package/dist/dashboard/app-sidebar.d.ts.map +1 -1
- package/dist/dashboard/app-sidebar.js +3 -36
- package/dist/dashboard/dashboard-components.js +1 -1
- package/dist/dashboard/data-table.d.ts +5 -1
- package/dist/dashboard/data-table.d.ts.map +1 -1
- package/dist/dashboard/data-table.js +39 -7
- package/dist/dashboard/table.js +1 -1
- package/dist/header/mobile-nav-item.js +2 -2
- package/dist/header/mobile-navbar.d.ts.map +1 -1
- package/dist/header/mobile-navbar.js +10 -1
- package/dist/header/nav-item.js +2 -2
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -0
- package/dist/main/footer.d.ts +0 -1
- package/dist/main/footer.d.ts.map +1 -1
- package/dist/main/footer.js +0 -1
- package/dist/main/navbar.d.ts +2 -2
- package/dist/main/navbar.d.ts.map +1 -1
- package/dist/main/navbar.js +73 -44
- package/dist/main/portfolio/portfolioItem.d.ts +1 -1
- package/dist/main/portfolio/portfolioItem.d.ts.map +1 -1
- package/dist/main/portfolio/portfolioPopup.d.ts +1 -1
- package/dist/main/portfolio/portfolioPopup.d.ts.map +1 -1
- package/dist/main/review-page.d.ts +2 -1
- package/dist/main/review-page.d.ts.map +1 -1
- package/dist/main/review-page.js +34 -4
- package/dist/misc/accordion.js +1 -1
- package/dist/misc/alert-dialog.js +1 -1
- package/dist/misc/alert.js +1 -1
- package/dist/misc/alertdialogclaude.js +1 -1
- package/dist/misc/avatar.js +1 -1
- package/dist/misc/badge.js +1 -1
- package/dist/misc/button.d.ts +6 -3
- package/dist/misc/button.d.ts.map +1 -1
- package/dist/misc/button.js +33 -5
- package/dist/misc/card.js +1 -1
- package/dist/misc/carousel.d.ts +2 -2
- package/dist/misc/carousel.d.ts.map +1 -1
- package/dist/misc/carousel.js +13 -5
- package/dist/misc/checkbox.js +1 -1
- package/dist/misc/command.js +1 -1
- package/dist/misc/datepicker.d.ts +2 -1
- package/dist/misc/datepicker.d.ts.map +1 -1
- package/dist/misc/datepicker.js +23 -21
- package/dist/misc/dialog.js +1 -1
- package/dist/misc/discount-strategy-editor.d.ts +11 -0
- package/dist/misc/discount-strategy-editor.d.ts.map +1 -0
- package/dist/misc/discount-strategy-editor.js +82 -0
- package/dist/misc/dropdown-menu.js +1 -1
- package/dist/misc/faq.d.ts +1 -1
- package/dist/misc/faq.d.ts.map +1 -1
- package/dist/misc/filter.js +2 -2
- package/dist/misc/filterBar.d.ts +11 -3
- package/dist/misc/filterBar.d.ts.map +1 -1
- package/dist/misc/filterBar.js +109 -55
- package/dist/misc/form.js +1 -1
- package/dist/misc/input.d.ts +4 -1
- package/dist/misc/input.d.ts.map +1 -1
- package/dist/misc/input.js +8 -3
- package/dist/misc/label.js +1 -1
- package/dist/misc/listing-wishlist-button.d.ts +13 -0
- package/dist/misc/listing-wishlist-button.d.ts.map +1 -0
- package/dist/misc/listing-wishlist-button.js +42 -0
- package/dist/misc/location/locationPicker.js +1 -1
- package/dist/misc/location-autocomplete.d.ts +28 -0
- package/dist/misc/location-autocomplete.d.ts.map +1 -0
- package/dist/misc/location-autocomplete.js +121 -0
- package/dist/misc/notification.js +2 -2
- package/dist/misc/pagination.js +1 -1
- package/dist/misc/popover.js +1 -1
- package/dist/misc/pricing-strategy-editor.d.ts +17 -0
- package/dist/misc/pricing-strategy-editor.d.ts.map +1 -0
- package/dist/misc/pricing-strategy-editor.js +80 -0
- package/dist/misc/progress.js +1 -1
- package/dist/misc/pwa-install-button.d.ts.map +1 -1
- package/dist/misc/pwa-install-button.js +2 -0
- package/dist/misc/rental-tile.d.ts +1 -1
- package/dist/misc/rental-tile.d.ts.map +1 -1
- package/dist/misc/rental-tile.js +24 -14
- package/dist/misc/scroll-area.js +1 -1
- package/dist/misc/select.js +1 -1
- package/dist/misc/separator.js +1 -1
- package/dist/misc/sheet.js +1 -1
- package/dist/misc/sidebar.js +2 -2
- package/dist/misc/slider.js +1 -1
- package/dist/misc/stateCard.d.ts +1 -1
- package/dist/misc/stateCard.d.ts.map +1 -1
- package/dist/misc/stateCard.js +1 -1
- package/dist/misc/step-progress.d.ts +16 -0
- package/dist/misc/step-progress.d.ts.map +1 -0
- package/dist/misc/step-progress.js +40 -0
- package/dist/misc/switch.js +1 -1
- package/dist/misc/tabs.js +1 -1
- package/dist/misc/tag-filter-input.d.ts +16 -0
- package/dist/misc/tag-filter-input.d.ts.map +1 -0
- package/dist/misc/tag-filter-input.js +26 -0
- package/dist/misc/textarea.js +1 -1
- package/dist/misc/tile.d.ts +1 -1
- package/dist/misc/tile.d.ts.map +1 -1
- package/dist/misc/tile.js +12 -47
- package/dist/misc/time-select.d.ts +14 -0
- package/dist/misc/time-select.d.ts.map +1 -0
- package/dist/misc/time-select.js +13 -0
- package/dist/misc/tooltip.js +1 -1
- package/dist/misc/wizard-footer.d.ts +18 -0
- package/dist/misc/wizard-footer.d.ts.map +1 -0
- package/dist/misc/wizard-footer.js +11 -0
- package/package.json +9 -6
- package/dist/misc/dashboard/action-buttons.js +0 -31
- package/dist/misc/misc/alertdialogclaude.js +0 -221
- package/dist/misc/misc/button.js +0 -46
- package/dist/misc/misc/dropdown-menu.js +0 -136
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Bell, Check, Copy, Eye, MessageCircle, Pencil, UserIcon, Users, X } from 'lucide-react';
|
|
3
|
+
import { formatDate } from '@myrjfa/state/dist/lib/utils';
|
|
4
|
+
import { ActionButtons } from '@myrjfa/ui/dist/dashboard/action-buttons';
|
|
5
|
+
import { StatusBadge } from '@myrjfa/ui/dist/dashboard/dashboard-components';
|
|
6
|
+
import { DataTableShell } from '@myrjfa/ui/dist/components/ui/dashboard/data-table-shell';
|
|
7
|
+
export function AdminOpportunitiesTable({ opportunities, observers, onEdit, onApprove, onDeny, onContact, onFeedback, onView, onViewApplicants, onCopy, onAssign, onNotifyUsers, role = 'user', // Default role if not provided
|
|
8
|
+
}) {
|
|
9
|
+
const getColumns = () => {
|
|
10
|
+
const baseColumns = [
|
|
11
|
+
{
|
|
12
|
+
header: 'Title',
|
|
13
|
+
accessorKey: 'title',
|
|
14
|
+
cell: (opportunity) => (_jsx("div", { className: "font-medium", children: opportunity.title })),
|
|
15
|
+
sortable: true,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
header: 'Status',
|
|
19
|
+
accessorKey: 'status',
|
|
20
|
+
cell: (opportunity) => _jsx(StatusBadge, { status: opportunity.status }),
|
|
21
|
+
sortable: true,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
header: 'Location',
|
|
25
|
+
accessorKey: 'city',
|
|
26
|
+
cell: (opportunity) => _jsx("div", { children: opportunity.city + ", " + opportunity.state }),
|
|
27
|
+
sortable: true,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
header: 'Trip Date',
|
|
31
|
+
accessorKey: 'availableFrom',
|
|
32
|
+
cell: (opportunity) => (_jsx("div", { children: formatDate(opportunity.availableFrom) })),
|
|
33
|
+
sortable: true,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
header: 'Positions',
|
|
37
|
+
accessorKey: 'peopleRequired',
|
|
38
|
+
cell: (opportunity) => (_jsx("div", { children: opportunity.peopleRequired })),
|
|
39
|
+
sortable: true,
|
|
40
|
+
},
|
|
41
|
+
];
|
|
42
|
+
// Add host and assignee columns only for admin role
|
|
43
|
+
if (role === 'admin') {
|
|
44
|
+
baseColumns.push({
|
|
45
|
+
header: 'Host',
|
|
46
|
+
accessorKey: 'hostId',
|
|
47
|
+
cell: (opportunity) => {
|
|
48
|
+
var _a;
|
|
49
|
+
return (_jsx("div", { className: "font-medium", children: (_a = opportunity === null || opportunity === void 0 ? void 0 : opportunity.hostId) === null || _a === void 0 ? void 0 : _a.username }));
|
|
50
|
+
},
|
|
51
|
+
sortable: true,
|
|
52
|
+
}, {
|
|
53
|
+
header: 'Assignee',
|
|
54
|
+
accessorKey: 'applicationObservers',
|
|
55
|
+
cell: (opportunity) => {
|
|
56
|
+
var _a, _b, _c;
|
|
57
|
+
return (_jsx("div", { className: "font-medium", children: (_c = (_b = (_a = opportunity === null || opportunity === void 0 ? void 0 : opportunity.applicationObservers) === null || _a === void 0 ? void 0 : _a.at(0)) === null || _b === void 0 ? void 0 : _b.username) !== null && _c !== void 0 ? _c : "" }));
|
|
58
|
+
},
|
|
59
|
+
sortable: true,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
return baseColumns;
|
|
63
|
+
};
|
|
64
|
+
const getOpportunityActions = (opportunity) => {
|
|
65
|
+
var _a;
|
|
66
|
+
const actions = [];
|
|
67
|
+
if (opportunity.status == 'pending' && onApprove && onDeny) {
|
|
68
|
+
actions.push({
|
|
69
|
+
label: 'Approve',
|
|
70
|
+
icon: _jsx(Check, { className: "h-4 w-4" }),
|
|
71
|
+
action: () => onApprove(opportunity.slug),
|
|
72
|
+
variant: 'default',
|
|
73
|
+
}, {
|
|
74
|
+
label: 'Deny',
|
|
75
|
+
icon: _jsx(X, { className: "h-4 w-4" }),
|
|
76
|
+
action: () => onDeny(opportunity.slug),
|
|
77
|
+
variant: 'destructive',
|
|
78
|
+
}, {
|
|
79
|
+
label: 'Feedback',
|
|
80
|
+
icon: _jsx(MessageCircle, { className: "h-4 w-4" }),
|
|
81
|
+
action: () => onFeedback(opportunity.hostId),
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
else if (opportunity.status === 'open') {
|
|
85
|
+
actions.push({
|
|
86
|
+
label: 'View Applicants',
|
|
87
|
+
icon: _jsx(Users, { className: "h-4 w-4" }),
|
|
88
|
+
action: () => onViewApplicants(opportunity.slug),
|
|
89
|
+
});
|
|
90
|
+
if (onNotifyUsers && ['volunteer', 'internship'].includes((_a = opportunity.opportunityType) !== null && _a !== void 0 ? _a : '')) {
|
|
91
|
+
actions.push({
|
|
92
|
+
label: 'Notify Matching Users',
|
|
93
|
+
icon: _jsx(Bell, { className: "h-4 w-4" }),
|
|
94
|
+
action: () => onNotifyUsers(opportunity.slug),
|
|
95
|
+
variant: 'outline',
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
// Always add view action
|
|
100
|
+
actions.push({
|
|
101
|
+
label: 'View Details',
|
|
102
|
+
icon: _jsx(Eye, { className: "h-4 w-4" }),
|
|
103
|
+
action: () => onView(opportunity.slug),
|
|
104
|
+
variant: 'outline',
|
|
105
|
+
}, {
|
|
106
|
+
label: 'Contact Business',
|
|
107
|
+
icon: _jsx(MessageCircle, { className: "h-4 w-4" }),
|
|
108
|
+
action: () => onContact(opportunity.hostId),
|
|
109
|
+
}, {
|
|
110
|
+
label: 'Edit',
|
|
111
|
+
icon: _jsx(Pencil, { className: "h-4 w-4" }),
|
|
112
|
+
action: () => onEdit(opportunity.slug),
|
|
113
|
+
variant: 'default',
|
|
114
|
+
}, {
|
|
115
|
+
label: 'Create New From This',
|
|
116
|
+
icon: _jsx(Copy, { className: "h-4 w-4" }),
|
|
117
|
+
action: () => onCopy(opportunity.slug),
|
|
118
|
+
});
|
|
119
|
+
// Add individual Assign buttons for each admin
|
|
120
|
+
if ((observers === null || observers === void 0 ? void 0 : observers.length) && onAssign) {
|
|
121
|
+
observers.forEach((observer) => {
|
|
122
|
+
actions.push({
|
|
123
|
+
label: `Assign to ${observer.username}`,
|
|
124
|
+
icon: _jsx(UserIcon, { className: "h-4 w-4" }),
|
|
125
|
+
action: () => onAssign(opportunity.slug, observer),
|
|
126
|
+
variant: 'outline',
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
return _jsx(ActionButtons, { actions: actions, maxDisplayed: 1 });
|
|
131
|
+
};
|
|
132
|
+
return (_jsx(DataTableShell, { data: opportunities, columns: getColumns(), actions: getOpportunityActions, onRowClick: onView }));
|
|
133
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Rental } from "@myrjfa/state/dist/lib/models/rental";
|
|
2
|
+
interface AdminRentalsTableProps {
|
|
3
|
+
rentals: Rental[];
|
|
4
|
+
onEdit: (slug: string) => void;
|
|
5
|
+
onApprove: (slug: string) => void;
|
|
6
|
+
onReject: (slug: string) => void;
|
|
7
|
+
onContact: (hostId: string) => void;
|
|
8
|
+
onView: (slug: string) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function AdminRentalsTable({ rentals, onEdit, onApprove, onReject, onContact, onView, }: AdminRentalsTableProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=admin-rentals-table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-rentals-table.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/dashboard/admin-rentals-table.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAC;AAS9D,UAAU,sBAAsB;IAC9B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC;AAED,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,MAAM,EACN,SAAS,EACT,QAAQ,EACR,SAAS,EACT,MAAM,GACP,EAAE,sBAAsB,2CA4FxB"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getPrimaryPricingStrategy, getPricingCurrency } from "@myrjfa/state/dist/lib/models/pricing";
|
|
3
|
+
import { formatDate } from "@myrjfa/state/dist/lib/utils";
|
|
4
|
+
import { ActionButtons } from "@myrjfa/ui/dist/dashboard/action-buttons";
|
|
5
|
+
import { StatusBadge } from "@myrjfa/ui/dist/dashboard/dashboard-components";
|
|
6
|
+
import { Check, Eye, MessageCircle, Pencil, X } from "lucide-react";
|
|
7
|
+
import { DataTableShell } from "@myrjfa/ui/dist/components/ui/dashboard/data-table-shell";
|
|
8
|
+
export function AdminRentalsTable({ rentals, onEdit, onApprove, onReject, onContact, onView, }) {
|
|
9
|
+
const columns = [
|
|
10
|
+
{
|
|
11
|
+
header: "Title",
|
|
12
|
+
accessorKey: "title",
|
|
13
|
+
cell: (rental) => _jsx("div", { className: "font-medium", children: rental.title }),
|
|
14
|
+
sortable: true,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
header: "Category",
|
|
18
|
+
accessorKey: "vehicleType",
|
|
19
|
+
cell: (rental) => _jsx("div", { className: "capitalize", children: rental.vehicleType }),
|
|
20
|
+
sortable: true,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
header: "Status",
|
|
24
|
+
accessorKey: "status",
|
|
25
|
+
cell: (rental) => _jsx(StatusBadge, { status: rental.status }),
|
|
26
|
+
sortable: true,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
header: "Location",
|
|
30
|
+
accessorKey: "city",
|
|
31
|
+
cell: (rental) => _jsx("div", { children: rental.city + ", " + rental.state }),
|
|
32
|
+
sortable: true,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
header: "Price/Day",
|
|
36
|
+
accessorKey: "pricing",
|
|
37
|
+
cell: (rental) => {
|
|
38
|
+
var _a;
|
|
39
|
+
return (_jsx("div", { children: getPrimaryPricingStrategy(rental)
|
|
40
|
+
? `${getPricingCurrency(rental)} ${(_a = getPrimaryPricingStrategy(rental)) === null || _a === void 0 ? void 0 : _a.finalBasePrice}`
|
|
41
|
+
: "N/A" }));
|
|
42
|
+
},
|
|
43
|
+
sortable: true,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
header: "Listed On",
|
|
47
|
+
accessorKey: "createdAt",
|
|
48
|
+
cell: (rental) => _jsx("div", { children: formatDate(rental.createdAt) }),
|
|
49
|
+
sortable: true,
|
|
50
|
+
},
|
|
51
|
+
];
|
|
52
|
+
const getRentalActions = (rental) => {
|
|
53
|
+
const actions = [];
|
|
54
|
+
if (rental.status === "pending") {
|
|
55
|
+
actions.push({
|
|
56
|
+
label: "Approve",
|
|
57
|
+
icon: _jsx(Check, { className: "h-4 w-4" }),
|
|
58
|
+
action: () => onApprove(rental.slug),
|
|
59
|
+
variant: "default",
|
|
60
|
+
}, {
|
|
61
|
+
label: "Reject",
|
|
62
|
+
icon: _jsx(X, { className: "h-4 w-4" }),
|
|
63
|
+
action: () => onReject(rental.slug),
|
|
64
|
+
variant: "destructive",
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
actions.push({
|
|
68
|
+
label: "View Details",
|
|
69
|
+
icon: _jsx(Eye, { className: "h-4 w-4" }),
|
|
70
|
+
action: () => onView(rental.slug),
|
|
71
|
+
variant: "outline",
|
|
72
|
+
}, {
|
|
73
|
+
label: "Contact Host",
|
|
74
|
+
icon: _jsx(MessageCircle, { className: "h-4 w-4" }),
|
|
75
|
+
action: () => onContact(typeof rental.hostId === "string" ? rental.hostId : rental.hostId._id || rental.hostId.username || ""),
|
|
76
|
+
}, {
|
|
77
|
+
label: "Edit",
|
|
78
|
+
icon: _jsx(Pencil, { className: "h-4 w-4" }),
|
|
79
|
+
action: () => onEdit(rental.slug),
|
|
80
|
+
variant: "default",
|
|
81
|
+
});
|
|
82
|
+
return _jsx(ActionButtons, { actions: actions, maxDisplayed: 1 });
|
|
83
|
+
};
|
|
84
|
+
return (_jsx(DataTableShell, { data: rentals, columns: columns, actions: getRentalActions, onRowClick: onView }));
|
|
85
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { User } from '@myrjfa/state/dist/lib/models/user';
|
|
2
|
+
import { TravelPackage } from '@myrjfa/state/dist/lib/models/travelPackage';
|
|
3
|
+
interface AdminTravelPackagesTableProps {
|
|
4
|
+
travelPackages: TravelPackage[];
|
|
5
|
+
onEdit: (id: string) => void;
|
|
6
|
+
onApprove?: (id: string) => void;
|
|
7
|
+
onDeny?: (id: string) => void;
|
|
8
|
+
onContact: (host: User) => void;
|
|
9
|
+
onFeedback: (host: User) => void;
|
|
10
|
+
onView: (id: string) => void;
|
|
11
|
+
onViewEnquiries: (id: string) => void;
|
|
12
|
+
onCopy: (id: string) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare function AdminTravelPackagesTable({ travelPackages, onEdit, onApprove, onDeny, onContact, onFeedback, onView, onViewEnquiries, onCopy, }: AdminTravelPackagesTableProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=admin-travel-package-table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-travel-package-table.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/dashboard/admin-travel-package-table.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAK1D,OAAO,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AAS5E,UAAU,6BAA6B;IACnC,cAAc,EAAE,aAAa,EAAE,CAAC;IAChC,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAChC,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACjC,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC;AAED,wBAAgB,wBAAwB,CAAC,EACrC,cAAc,EACd,MAAM,EACN,SAAS,EACT,MAAM,EACN,SAAS,EACT,UAAU,EACV,MAAM,EACN,eAAe,EACf,MAAM,GACT,EAAE,6BAA6B,2CAsH/B"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Check, Copy, Eye, MessageCircle, Pencil, Users, X } from 'lucide-react';
|
|
3
|
+
import { formatDate } from '@myrjfa/state/dist/lib/utils';
|
|
4
|
+
import { ActionButtons } from '@myrjfa/ui/dist/dashboard/action-buttons';
|
|
5
|
+
import { StatusBadge } from '@myrjfa/ui/dist/dashboard/dashboard-components';
|
|
6
|
+
import { DataTableShell } from '@myrjfa/ui/dist/components/ui/dashboard/data-table-shell';
|
|
7
|
+
const bookingModeLabels = {
|
|
8
|
+
enquiry: 'Enquiry',
|
|
9
|
+
booking: 'Booking',
|
|
10
|
+
both: 'Both',
|
|
11
|
+
};
|
|
12
|
+
export function AdminTravelPackagesTable({ travelPackages, onEdit, onApprove, onDeny, onContact, onFeedback, onView, onViewEnquiries, onCopy, }) {
|
|
13
|
+
const columns = [
|
|
14
|
+
{
|
|
15
|
+
header: 'Title',
|
|
16
|
+
accessorKey: 'title',
|
|
17
|
+
cell: (travelPackage) => (_jsx("div", { className: "font-medium", children: travelPackage.title })),
|
|
18
|
+
sortable: true,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
header: 'Status',
|
|
22
|
+
accessorKey: 'status',
|
|
23
|
+
cell: (travelPackage) => _jsx(StatusBadge, { status: travelPackage.status }),
|
|
24
|
+
sortable: true,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
header: 'Location',
|
|
28
|
+
accessorKey: 'city',
|
|
29
|
+
cell: (travelPackage) => _jsx("div", { children: travelPackage.city + ", " + travelPackage.state }),
|
|
30
|
+
sortable: true,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
header: 'Trip Date',
|
|
34
|
+
accessorKey: 'availableFrom',
|
|
35
|
+
cell: (travelPackage) => (_jsx("div", { children: formatDate(travelPackage.availableFrom) })),
|
|
36
|
+
sortable: true,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
header: 'Group Size',
|
|
40
|
+
accessorKey: 'peopleRequired',
|
|
41
|
+
cell: (travelPackage) => (_jsx("div", { children: travelPackage.peopleRequired })),
|
|
42
|
+
sortable: true,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
header: 'Response',
|
|
46
|
+
accessorKey: 'bookingMode',
|
|
47
|
+
cell: (travelPackage) => (_jsx("div", { children: bookingModeLabels[travelPackage.bookingMode || 'both'] })),
|
|
48
|
+
sortable: true,
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
const getTravelPackageActions = (travelPackage) => {
|
|
52
|
+
const actions = [];
|
|
53
|
+
if (travelPackage.status == 'pending' && onApprove && onDeny) {
|
|
54
|
+
actions.push({
|
|
55
|
+
label: 'Approve',
|
|
56
|
+
icon: _jsx(Check, { className: "h-4 w-4" }),
|
|
57
|
+
action: () => onApprove(travelPackage.slug),
|
|
58
|
+
variant: 'default',
|
|
59
|
+
}, {
|
|
60
|
+
label: 'Deny',
|
|
61
|
+
icon: _jsx(X, { className: "h-4 w-4" }),
|
|
62
|
+
action: () => onDeny(travelPackage.slug),
|
|
63
|
+
variant: 'destructive',
|
|
64
|
+
}, {
|
|
65
|
+
label: 'Feedback',
|
|
66
|
+
icon: _jsx(MessageCircle, { className: "h-4 w-4" }),
|
|
67
|
+
action: () => onFeedback(travelPackage.hostId),
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
else if (travelPackage.status === 'open') {
|
|
71
|
+
actions.push(...(travelPackage.bookingMode !== 'booking' ? [{
|
|
72
|
+
label: 'View Enquiries',
|
|
73
|
+
icon: _jsx(Users, { className: "h-4 w-4" }),
|
|
74
|
+
action: () => onViewEnquiries(travelPackage.slug),
|
|
75
|
+
}] : []));
|
|
76
|
+
}
|
|
77
|
+
// Always add view action
|
|
78
|
+
actions.push({
|
|
79
|
+
label: 'View Details',
|
|
80
|
+
icon: _jsx(Eye, { className: "h-4 w-4" }),
|
|
81
|
+
action: () => onView(travelPackage.slug),
|
|
82
|
+
variant: 'outline',
|
|
83
|
+
}, {
|
|
84
|
+
label: 'Contact Business',
|
|
85
|
+
icon: _jsx(MessageCircle, { className: "h-4 w-4" }),
|
|
86
|
+
action: () => onContact(travelPackage.hostId),
|
|
87
|
+
}, {
|
|
88
|
+
label: 'Edit',
|
|
89
|
+
icon: _jsx(Pencil, { className: "h-4 w-4" }),
|
|
90
|
+
action: () => onEdit(travelPackage.slug),
|
|
91
|
+
variant: 'default',
|
|
92
|
+
}, {
|
|
93
|
+
label: 'Create New From This',
|
|
94
|
+
icon: _jsx(Copy, { className: "h-4 w-4" }),
|
|
95
|
+
action: () => onCopy(travelPackage.slug),
|
|
96
|
+
});
|
|
97
|
+
return _jsx(ActionButtons, { actions: actions, maxDisplayed: 1 });
|
|
98
|
+
};
|
|
99
|
+
return (_jsx(DataTableShell, { data: travelPackages, columns: columns, actions: getTravelPackageActions, onRowClick: onView }));
|
|
100
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Adventure } from "@myrjfa/state/dist/lib/models/adventure";
|
|
2
|
+
interface AdventuresTableProps {
|
|
3
|
+
adventures: Adventure[];
|
|
4
|
+
onEdit: (slug: string) => void;
|
|
5
|
+
onDelete: (slug: string) => void;
|
|
6
|
+
onView: (slug: string) => void;
|
|
7
|
+
onArchive: (slug: string, currentStatus: string) => void;
|
|
8
|
+
onClose?: (slug: string) => void;
|
|
9
|
+
onRepost?: (slug: string) => void;
|
|
10
|
+
onCopy?: (slug: string) => void;
|
|
11
|
+
onManage?: (idOrSlug: string) => void;
|
|
12
|
+
onBookings?: (slug: string) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare function AdventuresTable({ adventures, onEdit, onDelete, onView, onArchive, onClose, onRepost, onCopy, onManage, onBookings, }: AdventuresTableProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=adventures-table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adventures-table.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/dashboard/adventures-table.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAUpE,UAAU,oBAAoB;IAC5B,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED,wBAAgB,eAAe,CAAC,EAC9B,UAAU,EACV,MAAM,EACN,QAAQ,EACR,MAAM,EACN,SAAS,EACT,OAAO,EACP,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,UAAU,GACX,EAAE,oBAAoB,2CAuJtB"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { getPrimaryPricingStrategy, getPricingCurrency } from "@myrjfa/state/dist/lib/models/pricing";
|
|
3
|
+
import { formatDate } from "@myrjfa/state/dist/lib/utils";
|
|
4
|
+
import { ActionButtons } from "@myrjfa/ui/dist/dashboard/action-buttons";
|
|
5
|
+
import { StatusBadge } from "@myrjfa/ui/dist/dashboard/dashboard-components";
|
|
6
|
+
import { Archive, ArchiveRestore, CalendarCheck2, ExternalLink, Eye, Pencil, SlidersHorizontal, Trash2, XCircle } from "lucide-react";
|
|
7
|
+
import Link from "next/link";
|
|
8
|
+
import { DataTableShell } from "@myrjfa/ui/dist/components/ui/dashboard/data-table-shell";
|
|
9
|
+
export function AdventuresTable({ adventures, onEdit, onDelete, onView, onArchive, onClose, onRepost, onCopy, onManage, onBookings, }) {
|
|
10
|
+
const columns = [
|
|
11
|
+
{
|
|
12
|
+
header: "Title",
|
|
13
|
+
accessorKey: "title",
|
|
14
|
+
cell: (a) => (_jsx(Link, { href: `/adventures/${a.slug}`, className: "hover:text-primary transition-colors font-medium block", children: a.title })),
|
|
15
|
+
sortable: true,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
header: "Activity",
|
|
19
|
+
accessorKey: "activityType",
|
|
20
|
+
cell: (a) => {
|
|
21
|
+
var _a;
|
|
22
|
+
return (_jsx("div", { className: "capitalize", children: (_a = a.activityType) === null || _a === void 0 ? void 0 : _a.replace("-", " ") }));
|
|
23
|
+
},
|
|
24
|
+
sortable: true,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
header: "Difficulty",
|
|
28
|
+
accessorKey: "difficulty",
|
|
29
|
+
cell: (a) => _jsx("div", { children: a.difficulty }),
|
|
30
|
+
sortable: true,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
header: "Status",
|
|
34
|
+
accessorKey: "status",
|
|
35
|
+
cell: (a) => _jsx(StatusBadge, { status: a.status }),
|
|
36
|
+
sortable: true,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
header: "Location",
|
|
40
|
+
accessorKey: "city",
|
|
41
|
+
cell: (a) => _jsx("div", { children: a.city + ", " + a.state }),
|
|
42
|
+
sortable: true,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
header: "Price/Person",
|
|
46
|
+
accessorKey: "pricing",
|
|
47
|
+
cell: (a) => {
|
|
48
|
+
var _a, _b;
|
|
49
|
+
return (_jsxs("div", { children: [getPricingCurrency(a), " ", (_b = (_a = getPrimaryPricingStrategy(a)) === null || _a === void 0 ? void 0 : _a.finalBasePrice) !== null && _b !== void 0 ? _b : 0] }));
|
|
50
|
+
},
|
|
51
|
+
sortable: true,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
header: "Listed On",
|
|
55
|
+
accessorKey: "createdAt",
|
|
56
|
+
cell: (a) => _jsx("div", { children: formatDate(a.createdAt) }),
|
|
57
|
+
sortable: true,
|
|
58
|
+
},
|
|
59
|
+
];
|
|
60
|
+
const getActions = (adventure) => {
|
|
61
|
+
const status = String(adventure.status || "").toLowerCase();
|
|
62
|
+
const isOpenStatus = status === "open";
|
|
63
|
+
const isPendingStatus = status === "pending" || status === "pending_approval";
|
|
64
|
+
const isDraftStatus = status === "draft";
|
|
65
|
+
const isClosedStatus = status === "closed";
|
|
66
|
+
const isArchivedStatus = status === "archived";
|
|
67
|
+
const canManage = !isDraftStatus;
|
|
68
|
+
const canEdit = !isClosedStatus && !isArchivedStatus;
|
|
69
|
+
const canDelete = !isOpenStatus && !isClosedStatus && !isArchivedStatus;
|
|
70
|
+
const canArchive = !isOpenStatus && !isPendingStatus && !isArchivedStatus;
|
|
71
|
+
const canView = !isDraftStatus;
|
|
72
|
+
const actions = [
|
|
73
|
+
...(onBookings
|
|
74
|
+
? [
|
|
75
|
+
{
|
|
76
|
+
label: "Bookings",
|
|
77
|
+
icon: _jsx(CalendarCheck2, { className: "h-4 w-4" }),
|
|
78
|
+
action: () => onBookings(adventure.slug),
|
|
79
|
+
variant: "outline",
|
|
80
|
+
},
|
|
81
|
+
]
|
|
82
|
+
: []),
|
|
83
|
+
...(onManage && canManage
|
|
84
|
+
? [
|
|
85
|
+
{
|
|
86
|
+
label: "Manage",
|
|
87
|
+
icon: _jsx(SlidersHorizontal, { className: "h-4 w-4" }),
|
|
88
|
+
action: () => onManage(String(adventure._id || adventure.slug)),
|
|
89
|
+
variant: "outline",
|
|
90
|
+
},
|
|
91
|
+
]
|
|
92
|
+
: []),
|
|
93
|
+
...(canEdit
|
|
94
|
+
? [{
|
|
95
|
+
label: "Edit",
|
|
96
|
+
icon: _jsx(Pencil, { className: "h-4 w-4" }),
|
|
97
|
+
action: () => onEdit(adventure.slug),
|
|
98
|
+
variant: "default",
|
|
99
|
+
}]
|
|
100
|
+
: []),
|
|
101
|
+
...((isOpenStatus && onClose)
|
|
102
|
+
? [{
|
|
103
|
+
label: "Close",
|
|
104
|
+
icon: _jsx(XCircle, { className: "h-4 w-4" }),
|
|
105
|
+
action: () => onClose(adventure.slug),
|
|
106
|
+
variant: "outline",
|
|
107
|
+
}]
|
|
108
|
+
: []),
|
|
109
|
+
...((isClosedStatus && onRepost)
|
|
110
|
+
? [{
|
|
111
|
+
label: "Repost",
|
|
112
|
+
icon: _jsx(ExternalLink, { className: "h-4 w-4" }),
|
|
113
|
+
action: () => onRepost(adventure.slug),
|
|
114
|
+
variant: "outline",
|
|
115
|
+
}]
|
|
116
|
+
: []),
|
|
117
|
+
...(canArchive
|
|
118
|
+
? [{
|
|
119
|
+
label: "Archive",
|
|
120
|
+
icon: _jsx(Archive, { className: "h-4 w-4" }),
|
|
121
|
+
action: () => onArchive(adventure.slug, adventure.status),
|
|
122
|
+
variant: "outline",
|
|
123
|
+
}]
|
|
124
|
+
: []),
|
|
125
|
+
...(isArchivedStatus
|
|
126
|
+
? [{
|
|
127
|
+
label: "Unarchive",
|
|
128
|
+
icon: _jsx(ArchiveRestore, { className: "h-4 w-4" }),
|
|
129
|
+
action: () => onArchive(adventure.slug, adventure.status),
|
|
130
|
+
variant: "outline",
|
|
131
|
+
}]
|
|
132
|
+
: []),
|
|
133
|
+
...(canDelete
|
|
134
|
+
? [{
|
|
135
|
+
label: "Delete",
|
|
136
|
+
icon: _jsx(Trash2, { className: "h-4 w-4" }),
|
|
137
|
+
action: () => onDelete(adventure.slug),
|
|
138
|
+
variant: "destructive",
|
|
139
|
+
}]
|
|
140
|
+
: []),
|
|
141
|
+
...(canView ? [{
|
|
142
|
+
label: "View",
|
|
143
|
+
icon: _jsx(Eye, { className: "h-4 w-4" }),
|
|
144
|
+
action: () => onView(adventure.slug),
|
|
145
|
+
variant: "outline",
|
|
146
|
+
}] : []),
|
|
147
|
+
];
|
|
148
|
+
return _jsx(ActionButtons, { actions: actions, maxDisplayed: 1, mobileMaxDisplayed: 2 });
|
|
149
|
+
};
|
|
150
|
+
return _jsx(DataTableShell, { data: adventures, columns: columns, actions: getActions, onRowClick: onView });
|
|
151
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Application } from '@myrjfa/state/dist/lib/models/application';
|
|
2
|
+
interface ApproverApplicationTableProps {
|
|
3
|
+
applications: Application[];
|
|
4
|
+
onApprove: (id: string) => void;
|
|
5
|
+
onDeny: (id: string) => void;
|
|
6
|
+
onContact: (id: string) => void;
|
|
7
|
+
onCall: (id: string) => void;
|
|
8
|
+
onRate: (id: string) => void;
|
|
9
|
+
onViewDetails: (id: string) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function ApproverApplicationTable({ applications, onApprove, onDeny, onContact, onCall, onRate, onViewDetails, }: ApproverApplicationTableProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=approver-applications-table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"approver-applications-table.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/dashboard/approver-applications-table.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAIxE,UAAU,6BAA6B;IACrC,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED,wBAAgB,wBAAwB,CAAC,EACvC,YAAY,EACZ,SAAS,EACT,MAAM,EACN,SAAS,EACT,MAAM,EACN,MAAM,EACN,aAAa,GACd,EAAE,6BAA6B,2CA+F/B"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Check, Eye, Mail, Phone, Star, X } from 'lucide-react';
|
|
3
|
+
import { ActionButtons } from '@myrjfa/ui/dist//dashboard/action-buttons';
|
|
4
|
+
import { StatusBadge } from '@myrjfa/ui/dist//dashboard/dashboard-components';
|
|
5
|
+
import { formatDate } from '@myrjfa/state/dist/lib/utils';
|
|
6
|
+
import { DataTableShell } from '@myrjfa/ui/dist/components/ui/dashboard/data-table-shell';
|
|
7
|
+
export function ApproverApplicationTable({ applications, onApprove, onDeny, onContact, onCall, onRate, onViewDetails, }) {
|
|
8
|
+
const columns = [
|
|
9
|
+
{
|
|
10
|
+
header: 'Name',
|
|
11
|
+
accessorKey: 'name',
|
|
12
|
+
cell: (application) => _jsx("div", { className: "font-medium", children: application.name }),
|
|
13
|
+
sortable: true,
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
header: 'Status',
|
|
17
|
+
accessorKey: 'status',
|
|
18
|
+
cell: (application) => _jsx(StatusBadge, { status: application.status == "adminApproved" ? "Trippeaze Shortlisted" : application.status }),
|
|
19
|
+
sortable: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
header: 'Applied On',
|
|
23
|
+
accessorKey: 'createdAt',
|
|
24
|
+
cell: (application) => _jsx("div", { children: formatDate(application.createdAt) }),
|
|
25
|
+
sortable: true,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
header: 'Trip Dates',
|
|
29
|
+
accessorKey: 'tripStartDate',
|
|
30
|
+
cell: (application) => (_jsxs("div", { children: [formatDate(application.tripStartDate), " - ", formatDate(application.tripEndDate)] })),
|
|
31
|
+
sortable: true,
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
const getApproverApplicationActions = (application) => {
|
|
35
|
+
const actions = [];
|
|
36
|
+
// Always add view profile action
|
|
37
|
+
actions.push({
|
|
38
|
+
label: 'View Details',
|
|
39
|
+
icon: _jsx(Eye, { className: "h-4 w-4" }),
|
|
40
|
+
action: () => onViewDetails(application._id),
|
|
41
|
+
variant: 'outline',
|
|
42
|
+
});
|
|
43
|
+
if (application.status === 'pending' || application.status === 'adminApproved') {
|
|
44
|
+
actions.push({
|
|
45
|
+
label: 'Approve',
|
|
46
|
+
icon: _jsx(Check, { className: "h-4 w-4" }),
|
|
47
|
+
action: () => onApprove(application._id),
|
|
48
|
+
variant: 'default',
|
|
49
|
+
}, {
|
|
50
|
+
label: 'Deny',
|
|
51
|
+
icon: _jsx(X, { className: "h-4 w-4" }),
|
|
52
|
+
action: () => onDeny(application._id),
|
|
53
|
+
variant: 'destructive',
|
|
54
|
+
}, {
|
|
55
|
+
label: 'Contact',
|
|
56
|
+
icon: _jsx(Mail, { className: "h-4 w-4" }),
|
|
57
|
+
action: () => { var _a; return onContact((_a = application.userId) !== null && _a !== void 0 ? _a : ""); },
|
|
58
|
+
}, {
|
|
59
|
+
label: 'Call',
|
|
60
|
+
icon: _jsx(Phone, { className: "h-4 w-4" }),
|
|
61
|
+
action: () => { var _a; return onCall((_a = application.userId) !== null && _a !== void 0 ? _a : ""); },
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
else if (application.status === 'approved') {
|
|
65
|
+
actions.push({
|
|
66
|
+
label: 'Contact',
|
|
67
|
+
icon: _jsx(Mail, { className: "h-4 w-4" }),
|
|
68
|
+
action: () => { var _a; return onContact((_a = application.userId) !== null && _a !== void 0 ? _a : ""); },
|
|
69
|
+
}, {
|
|
70
|
+
label: 'Call',
|
|
71
|
+
icon: _jsx(Phone, { className: "h-4 w-4" }),
|
|
72
|
+
action: () => { var _a; return onCall((_a = application.userId) !== null && _a !== void 0 ? _a : ""); },
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
else if (application.status == 'completed') {
|
|
76
|
+
actions.push({
|
|
77
|
+
label: 'Rate & Review',
|
|
78
|
+
icon: _jsx(Star, { className: "h-4 w-4" }),
|
|
79
|
+
action: () => onRate(application.userId),
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
return _jsx(ActionButtons, { actions: actions, maxDisplayed: 2 });
|
|
83
|
+
};
|
|
84
|
+
return (_jsx(DataTableShell, { data: applications, columns: columns, actions: getApproverApplicationActions, onRowClick: onViewDetails }));
|
|
85
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PackageEnquiry } from '@myrjfa/state/dist/lib/models/enquiry';
|
|
2
|
+
interface PackageEnquiryTableProps {
|
|
3
|
+
enquiries: PackageEnquiry[];
|
|
4
|
+
onClose: (id: string) => void;
|
|
5
|
+
onContact: (id: string) => void;
|
|
6
|
+
onCall: (id: string) => void;
|
|
7
|
+
onViewDetails: (id: string) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function ApproverPackageEnquiryTable({ enquiries, onClose, onContact, onCall, onViewDetails, }: PackageEnquiryTableProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=approver-package-enquiries-table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"approver-package-enquiries-table.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/dashboard/approver-package-enquiries-table.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAGvE,UAAU,wBAAwB;IAC9B,SAAS,EAAE,cAAc,EAAE,CAAC;IAC5B,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAED,wBAAgB,2BAA2B,CAAC,EACxC,SAAS,EACT,OAAO,EACP,SAAS,EACT,MAAM,EACN,aAAa,GAChB,EAAE,wBAAwB,2CAyH1B"}
|