@ozdao/martyrs 0.2.492 → 0.2.493
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/_virtual/index.cjs +4 -4
- package/dist/_virtual/index.js +4 -4
- package/dist/_virtual/index2.cjs +4 -4
- package/dist/_virtual/index2.js +4 -4
- package/dist/builder.cjs +52 -45
- package/dist/builder.js +53 -46
- package/dist/{crud-B-kQw3Z5.cjs → crud-JN_LFj01.cjs} +3 -0
- package/dist/{crud-Cwx5VlSm.js → crud-sE7GLPbj.js} +3 -0
- package/dist/globals.server.cjs +322 -3
- package/dist/globals.server.js +303 -1
- package/dist/{globals.verifier-D68mHEBl.cjs → globals.verifier-C0zj_LLo.cjs} +8 -1
- package/dist/{globals.verifier-CWFz5Gh2.js → globals.verifier-DFqKQ7hK.js} +8 -1
- package/dist/inventory.server.cjs +2 -2
- package/dist/inventory.server.js +2 -2
- package/dist/{main-SZQ1QjeP.js → main-CJm5myDI.js} +631 -607
- package/dist/{main-MzmGbSxs.cjs → main-DTaE01lg.cjs} +6 -6
- package/dist/martyrs/src/components/Calendar/Calendar.vue2.cjs +1 -1
- package/dist/martyrs/src/components/Calendar/Calendar.vue2.cjs.map +1 -1
- package/dist/martyrs/src/components/Calendar/Calendar.vue2.js +1 -1
- package/dist/martyrs/src/components/Calendar/Calendar.vue2.js.map +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs +33 -7
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.js +33 -7
- package/dist/martyrs/src/components/Feed/Feed.vue.js.map +1 -1
- package/dist/martyrs/src/components/Field/{Field.vue2.cjs → Field.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Field/{Field.vue2.js.map → Field.vue.cjs.map} +1 -1
- package/dist/martyrs/src/components/Field/{Field.vue2.js → Field.vue.js} +2 -2
- package/dist/martyrs/src/components/Field/Field.vue.js.map +1 -0
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +1 -1
- package/dist/martyrs/src/components/FieldTags/FieldTags.vue.cjs +1 -1
- package/dist/martyrs/src/components/FieldTags/FieldTags.vue.js +1 -1
- package/dist/martyrs/src/components/Menu/{Menu.vue.cjs → Menu.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Menu/Menu.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Menu/{Menu.vue.js → Menu.vue2.js} +2 -2
- package/dist/martyrs/src/components/Menu/Menu.vue2.js.map +1 -0
- package/dist/martyrs/src/components/Menu/MenuItem.vue.js +2 -2
- package/dist/martyrs/src/components/Menu/MenuItem.vue.js.map +1 -1
- package/dist/martyrs/src/components/PhotoViewer/PhotoViewer.vue.js +4 -4
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +2 -2
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
- package/dist/martyrs/src/modules/constructor/components/elements/Card.vue.cjs +1 -1
- package/dist/martyrs/src/modules/constructor/components/elements/Card.vue.js +1 -1
- package/dist/martyrs/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
- package/dist/martyrs/src/modules/constructor/components/elements/Embed.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/BlockSearch.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/BlockSearch.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +5 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +5 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js.map +1 -1
- package/dist/martyrs/src/modules/icons/entities/IconTime.vue.cjs +2 -2
- package/dist/martyrs/src/modules/icons/entities/IconTime.vue.js +2 -2
- package/dist/martyrs/src/modules/icons/navigation/IconChevronLeft.vue.cjs +2 -2
- package/dist/martyrs/src/modules/icons/navigation/IconChevronLeft.vue.js +2 -2
- package/dist/martyrs/src/modules/icons/navigation/IconChevronRight.vue.cjs +2 -2
- package/dist/martyrs/src/modules/icons/navigation/IconChevronRight.vue.js +2 -2
- package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.js +6 -6
- package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.js.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.cjs +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.cjs +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.cjs +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.cjs +22 -15
- package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js +23 -16
- package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.cjs +2 -2
- package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.cjs +31 -13
- package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js +33 -15
- package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.cjs +39 -22
- package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js +39 -22
- package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.cjs +385 -125
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +391 -131
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.cjs +24 -7
- package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js +25 -8
- package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.cjs +99 -87
- package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +111 -99
- package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/layouts/MusicBottomPlayer.vue.cjs +21 -0
- package/dist/martyrs/src/modules/music/components/layouts/MusicBottomPlayer.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/components/layouts/MusicBottomPlayer.vue.js +21 -0
- package/dist/martyrs/src/modules/music/components/layouts/MusicBottomPlayer.vue.js.map +1 -0
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.cjs +442 -210
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +445 -213
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Artist.vue.cjs +92 -117
- package/dist/martyrs/src/modules/music/components/pages/Artist.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +93 -118
- package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.cjs +72 -113
- package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.js +78 -119
- package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.cjs +15 -12
- package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js +15 -12
- package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.cjs +558 -429
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +560 -431
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.cjs +146 -284
- package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +149 -287
- package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.cjs +460 -63
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +462 -65
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.cjs +126 -136
- package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js +129 -139
- package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.cjs +18 -15
- package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.js +18 -15
- package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.cjs +28 -23
- package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.js +29 -24
- package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/music.client.cjs +3 -6
- package/dist/martyrs/src/modules/music/music.client.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/music.client.js +9 -12
- package/dist/martyrs/src/modules/music/music.client.js.map +1 -1
- package/dist/martyrs/src/modules/music/router/music.cjs +27 -1
- package/dist/martyrs/src/modules/music/router/music.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/router/music.js +27 -1
- package/dist/martyrs/src/modules/music/router/music.js.map +1 -1
- package/dist/martyrs/src/modules/music/store/artists.cjs +6 -4
- package/dist/martyrs/src/modules/music/store/artists.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/store/artists.js +6 -4
- package/dist/martyrs/src/modules/music/store/artists.js.map +1 -1
- package/dist/martyrs/src/modules/music/store/player.cjs +5 -0
- package/dist/martyrs/src/modules/music/store/player.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/store/player.js +5 -0
- package/dist/martyrs/src/modules/music/store/player.js.map +1 -1
- package/dist/martyrs/src/modules/music/store/tracks.cjs +22 -0
- package/dist/martyrs/src/modules/music/store/tracks.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/store/tracks.js +22 -0
- package/dist/martyrs/src/modules/music/store/tracks.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderBackoffice.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/router/organizations.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/router/organizations.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttBar.vue.cjs +4 -3
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttBar.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttBar.vue.js +4 -3
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttBar.vue.js.map +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttChart.vue.cjs +37 -70
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttChart.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttChart.vue.js +38 -71
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttChart.vue.js.map +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.cjs +2 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +6 -5
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js.map +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.cjs +45 -52
- package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.js +46 -53
- package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.js.map +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
- package/dist/martyrs.cjs.js +1 -1
- package/dist/martyrs.css +1 -1
- package/dist/martyrs.es.js +1 -1
- package/dist/music.server.cjs +124 -31
- package/dist/music.server.js +124 -31
- package/dist/organizations.server.cjs +1 -1
- package/dist/organizations.server.js +1 -1
- package/dist/products.server.cjs +2 -2
- package/dist/products.server.js +2 -2
- package/dist/rents.server.cjs +3 -3
- package/dist/rents.server.js +3 -3
- package/dist/style.css +373 -80
- package/dist/{web-D7lZjuC0.js → web-Dkk0_7TA.js} +1 -1
- package/dist/{web-D-YZ9KHz.cjs → web-stVkXd0l.cjs} +1 -1
- package/package.json +1 -1
- package/src/builder/modes/ssr.prod.js +21 -5
- package/src/builder/rspack/rspack.config.ssr.client.js +40 -40
- package/src/components/Calendar/Calendar.vue +378 -377
- package/src/components/Feed/Feed.vue +28 -2
- package/src/modules/globals/controllers/classes/crud/crud.policies.js +5 -0
- package/src/modules/globals/controllers/classes/globals.validator.js +8 -1
- package/src/modules/globals/views/components/layouts/Client.vue +7 -0
- package/src/modules/music/README.md +8 -0
- package/src/modules/music/components/SidebarMusic.vue +6 -9
- package/src/modules/music/components/cards/AlbumCard.vue +20 -14
- package/src/modules/music/components/cards/ArtistCard.vue +1 -1
- package/src/modules/music/components/cards/PlaylistCard.vue +31 -11
- package/src/modules/music/components/cards/TrackListCard.vue +24 -13
- package/src/modules/music/components/forms/PlaylistForm.vue +417 -107
- package/src/modules/music/components/forms/SearchForm.vue +31 -8
- package/src/modules/music/components/forms/TrackForm.vue +50 -32
- package/src/modules/music/components/layouts/MusicBottomPlayer.vue +17 -0
- package/src/modules/music/components/pages/Album.vue +373 -186
- package/src/modules/music/components/pages/Artist.vue +54 -94
- package/src/modules/music/components/pages/MusicHome.vue +59 -56
- package/src/modules/music/components/pages/MusicLibrary.vue +13 -11
- package/src/modules/music/components/pages/Playlist.vue +495 -379
- package/src/modules/music/components/pages/SearchResults.vue +185 -313
- package/src/modules/music/components/pages/Track.vue +363 -69
- package/src/modules/music/components/player/MusicPlayer.vue +368 -97
- package/src/modules/music/components/player/TrackProgress.vue +76 -22
- package/src/modules/music/components/player/VolumeControl.vue +61 -28
- package/src/modules/music/controllers/search.controller.js +3 -0
- package/src/modules/music/controllers/stream.controller.js +11 -3
- package/src/modules/music/middlewares/playlists.verifier.js +1 -1
- package/src/modules/music/music.client.js +3 -6
- package/src/modules/music/music.server.js +8 -4
- package/src/modules/music/router/music.js +8 -1
- package/src/modules/music/routes/albums.routes.js +37 -5
- package/src/modules/music/routes/artists.routes.js +14 -4
- package/src/modules/music/routes/genres.routes.js +5 -1
- package/src/modules/music/routes/playlists.routes.js +42 -9
- package/src/modules/music/routes/tracks.routes.js +27 -2
- package/src/modules/music/store/artists.js +6 -2
- package/src/modules/music/store/player.js +6 -0
- package/src/modules/music/store/tracks.js +31 -0
- package/src/modules/music/websocket/streaming.handler.js +7 -1
- package/src/modules/rents/controllers/services/rents.services.js +2 -2
- package/src/modules/rents/views/components/pages/Gant/GanttBar.vue +4 -3
- package/src/modules/rents/views/components/pages/Gant/GanttChart.vue +42 -40
- package/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue +3 -1
- package/src/modules/rents/views/components/pages/Rents.vue +60 -56
- package/dist/globals.websocket-DzvdIBf6.js +0 -306
- package/dist/globals.websocket-k6_B1T7k.cjs +0 -322
- package/dist/martyrs/src/components/Field/Field.vue2.cjs.map +0 -1
- package/dist/martyrs/src/components/Menu/Menu.vue.cjs.map +0 -1
- package/dist/martyrs/src/components/Menu/Menu.vue.js.map +0 -1
- package/dist/martyrs/src/modules/music/components/cards/TrackCard.vue.cjs +0 -69
- package/dist/martyrs/src/modules/music/components/cards/TrackCard.vue.cjs.map +0 -1
- package/dist/martyrs/src/modules/music/components/cards/TrackCard.vue.js +0 -69
- package/dist/martyrs/src/modules/music/components/cards/TrackCard.vue.js.map +0 -1
- package/dist/martyrs/src/modules/music/components/layouts/MusicLayout.vue.cjs +0 -104
- package/dist/martyrs/src/modules/music/components/layouts/MusicLayout.vue.cjs.map +0 -1
- package/dist/martyrs/src/modules/music/components/layouts/MusicLayout.vue.js +0 -104
- package/dist/martyrs/src/modules/music/components/layouts/MusicLayout.vue.js.map +0 -1
- package/src/modules/music/components/cards/TrackCard.vue +0 -86
- package/src/modules/music/components/layouts/MusicLayout.vue +0 -83
|
@@ -1,3 +1,381 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, ref, watch } from 'vue'
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
modelValue: [Date, Object],
|
|
6
|
+
allowRange: Boolean,
|
|
7
|
+
disabled: Boolean,
|
|
8
|
+
disablePastDates: {
|
|
9
|
+
type: Boolean,
|
|
10
|
+
default: false
|
|
11
|
+
},
|
|
12
|
+
availabilityData: {
|
|
13
|
+
type: Array,
|
|
14
|
+
default: () => []
|
|
15
|
+
},
|
|
16
|
+
showAvailability: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: false
|
|
19
|
+
},
|
|
20
|
+
lowAvailabilityThreshold: {
|
|
21
|
+
type: Number,
|
|
22
|
+
default: 3
|
|
23
|
+
},
|
|
24
|
+
requiredQuantity: {
|
|
25
|
+
type: Number,
|
|
26
|
+
default: 1
|
|
27
|
+
}
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
const emit = defineEmits(['update:modelValue'])
|
|
31
|
+
|
|
32
|
+
const dateCalendar = defineModel('date')
|
|
33
|
+
|
|
34
|
+
const today = new Date()
|
|
35
|
+
const currentDate = ref(today)
|
|
36
|
+
const selectedDate = ref(null)
|
|
37
|
+
const startDate = ref(null)
|
|
38
|
+
const endDate = ref(null)
|
|
39
|
+
const tooltip = ref({ show: false, message: '', x: 0, y: 0 })
|
|
40
|
+
|
|
41
|
+
const daysOfWeek = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
|
|
42
|
+
|
|
43
|
+
// Watch for availability data updates
|
|
44
|
+
watch(() => props.availabilityData, (newData) => {
|
|
45
|
+
// You could perform additional processing when availability data changes
|
|
46
|
+
}, { deep: true })
|
|
47
|
+
|
|
48
|
+
const toUTC = (date) => {
|
|
49
|
+
return new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()))
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const toEndOfDayUTC = (date) => {
|
|
53
|
+
const endOfDay = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), 23, 59, 59));
|
|
54
|
+
return endOfDay;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const dateToString = (date) => {
|
|
58
|
+
return date.toISOString().split('T')[0];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const monthYear = computed(() => {
|
|
62
|
+
const month = currentDate.value.toLocaleString('default', { month: 'long', timeZone: 'UTC' })
|
|
63
|
+
const year = currentDate.value.getUTCFullYear()
|
|
64
|
+
return `${month} ${year}`
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
const isPrevMonthDisabled = computed(() => {
|
|
68
|
+
if (!props.disablePastDates) return false;
|
|
69
|
+
|
|
70
|
+
// Check if current view month is the current month
|
|
71
|
+
return currentDate.value.getUTCMonth() === today.getUTCMonth() &&
|
|
72
|
+
currentDate.value.getUTCFullYear() === today.getUTCFullYear();
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
const daysInMonth = computed(() => {
|
|
76
|
+
const days = []
|
|
77
|
+
const firstDay = new Date(Date.UTC(
|
|
78
|
+
currentDate.value.getUTCFullYear(),
|
|
79
|
+
currentDate.value.getUTCMonth(),
|
|
80
|
+
1
|
|
81
|
+
))
|
|
82
|
+
const lastDay = new Date(Date.UTC(
|
|
83
|
+
currentDate.value.getUTCFullYear(),
|
|
84
|
+
currentDate.value.getUTCMonth() + 1,
|
|
85
|
+
0
|
|
86
|
+
))
|
|
87
|
+
|
|
88
|
+
const firstDayOfWeek = firstDay.getUTCDay()
|
|
89
|
+
|
|
90
|
+
let date = new Date(firstDay)
|
|
91
|
+
|
|
92
|
+
date.setUTCDate(date.getUTCDate() - firstDayOfWeek)
|
|
93
|
+
|
|
94
|
+
for (let i = 0; i < firstDayOfWeek; i++) {
|
|
95
|
+
days.push({
|
|
96
|
+
date: new Date(date),
|
|
97
|
+
day: date.getUTCDate(),
|
|
98
|
+
isToday: isToday(date),
|
|
99
|
+
})
|
|
100
|
+
date.setUTCDate(date.getUTCDate() + 1)
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
let day = 1
|
|
104
|
+
|
|
105
|
+
for (date = firstDay; date <= lastDay; date.setUTCDate(date.getUTCDate() + 1)) {
|
|
106
|
+
days.push({
|
|
107
|
+
date: new Date(date),
|
|
108
|
+
day,
|
|
109
|
+
isToday: isToday(date),
|
|
110
|
+
})
|
|
111
|
+
day++
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const lastDayOfWeek = days[days.length - 1].date.getUTCDay()
|
|
115
|
+
|
|
116
|
+
for (let i = lastDayOfWeek + 1; i <= 6; i++) {
|
|
117
|
+
days.push({
|
|
118
|
+
date: new Date(date),
|
|
119
|
+
day: date.getUTCDate(),
|
|
120
|
+
isToday: isToday(date),
|
|
121
|
+
})
|
|
122
|
+
date.setUTCDate(date.getUTCDate() + 1)
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return days
|
|
126
|
+
})
|
|
127
|
+
|
|
128
|
+
const isToday = (date) => {
|
|
129
|
+
const today = new Date()
|
|
130
|
+
return (
|
|
131
|
+
date.getUTCDate() === today.getUTCDate() &&
|
|
132
|
+
date.getUTCMonth() === today.getUTCMonth() &&
|
|
133
|
+
date.getUTCFullYear() === today.getUTCFullYear()
|
|
134
|
+
)
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const isSameMonth = (date) => {
|
|
138
|
+
return (
|
|
139
|
+
date.getUTCMonth() === currentDate.value.getUTCMonth() &&
|
|
140
|
+
date.getUTCFullYear() === currentDate.value.getUTCFullYear()
|
|
141
|
+
)
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const isPastDate = (date) => {
|
|
145
|
+
if (!props.disablePastDates) return false;
|
|
146
|
+
|
|
147
|
+
const now = new Date();
|
|
148
|
+
// Compare only dates without time
|
|
149
|
+
const todayDate = new Date(Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate()));
|
|
150
|
+
const compareDate = new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate()));
|
|
151
|
+
|
|
152
|
+
return compareDate < todayDate;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
const getAvailabilityInfo = (date) => {
|
|
156
|
+
if (!props.availabilityData || props.availabilityData.length === 0) return null;
|
|
157
|
+
|
|
158
|
+
const dateStr = dateToString(date);
|
|
159
|
+
return props.availabilityData.find(item => item.date === dateStr);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
const isAvailable = (date) => {
|
|
163
|
+
if (!props.availabilityData || props.availabilityData.length === 0) return true;
|
|
164
|
+
|
|
165
|
+
const availabilityInfo = getAvailabilityInfo(date);
|
|
166
|
+
return !availabilityInfo || availabilityInfo.availableQuantity > 0;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
const isLowAvailability = (date) => {
|
|
170
|
+
if (!props.availabilityData || props.availabilityData.length === 0) return false;
|
|
171
|
+
|
|
172
|
+
const availabilityInfo = getAvailabilityInfo(date);
|
|
173
|
+
return availabilityInfo &&
|
|
174
|
+
availabilityInfo.availableQuantity > 0 &&
|
|
175
|
+
availabilityInfo.availableQuantity <= props.lowAvailabilityThreshold;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
const getAvailability = (date) => {
|
|
179
|
+
if (!props.showAvailability) return null;
|
|
180
|
+
|
|
181
|
+
const availabilityInfo = getAvailabilityInfo(date);
|
|
182
|
+
return availabilityInfo ? availabilityInfo.availableQuantity : null;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
const isSelected = (date) => {
|
|
186
|
+
if (props.allowRange) {
|
|
187
|
+
if (startDate.value && endDate.value) {
|
|
188
|
+
return date >= new Date(startDate.value) && toEndOfDayUTC(date) <= new Date(endDate.value);
|
|
189
|
+
} else if (startDate.value) {
|
|
190
|
+
return date.getTime() === new Date(startDate.value).getTime();
|
|
191
|
+
}
|
|
192
|
+
} else {
|
|
193
|
+
return selectedDate.value && date.getTime() === new Date(selectedDate.value).getTime();
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
const isInRange = (date) => {
|
|
198
|
+
if (startDate.value && endDate.value) {
|
|
199
|
+
return date > startDate.value && toEndOfDayUTC(date) < endDate.value
|
|
200
|
+
}
|
|
201
|
+
return false
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
const selectDate = (date, event) => {
|
|
205
|
+
// Don't allow selection of past dates or unavailable dates
|
|
206
|
+
if (props.disablePastDates && isPastDate(date)) return;
|
|
207
|
+
if (!isAvailable(date)) return;
|
|
208
|
+
|
|
209
|
+
// Check if date has sufficient quantity for required amount
|
|
210
|
+
const availabilityInfo = getAvailabilityInfo(date);
|
|
211
|
+
if (availabilityInfo && availabilityInfo.availableQuantity < props.requiredQuantity) {
|
|
212
|
+
// Show tooltip with insufficient quantity message
|
|
213
|
+
if (event) {
|
|
214
|
+
tooltip.value = {
|
|
215
|
+
show: true,
|
|
216
|
+
message: `Insufficient quantity. Available: ${availabilityInfo.availableQuantity}, needed: ${props.requiredQuantity}`,
|
|
217
|
+
x: event.clientX,
|
|
218
|
+
y: event.clientY
|
|
219
|
+
};
|
|
220
|
+
setTimeout(() => {
|
|
221
|
+
tooltip.value.show = false;
|
|
222
|
+
}, 3000);
|
|
223
|
+
}
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// Hide tooltip if it was showing
|
|
228
|
+
tooltip.value.show = false;
|
|
229
|
+
|
|
230
|
+
// If selecting a date from another month, switch to that month
|
|
231
|
+
if (!isSameMonth(date)) {
|
|
232
|
+
// currentDate.value = new Date(Date.UTC(
|
|
233
|
+
// date.getUTCFullYear(),
|
|
234
|
+
// date.getUTCMonth(),
|
|
235
|
+
// 1
|
|
236
|
+
// ));
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
const formattedDate = toUTC(date)
|
|
240
|
+
|
|
241
|
+
if (!props.allowRange) {
|
|
242
|
+
selectedDate.value = formattedDate
|
|
243
|
+
dateCalendar.value = formattedDate
|
|
244
|
+
} else if (!startDate.value && !endDate.value) {
|
|
245
|
+
startDate.value = formattedDate
|
|
246
|
+
dateCalendar.value = { start: formattedDate, end: null }
|
|
247
|
+
} else if (!endDate.value) {
|
|
248
|
+
endDate.value = toEndOfDayUTC(date)
|
|
249
|
+
if (formattedDate < startDate.value) {
|
|
250
|
+
const temp = toEndOfDayUTC(startDate.value)
|
|
251
|
+
startDate.value = formattedDate
|
|
252
|
+
endDate.value = temp
|
|
253
|
+
}
|
|
254
|
+
// Verify all dates in the range are available
|
|
255
|
+
if (props.availabilityData && props.availabilityData.length > 0) {
|
|
256
|
+
let allDatesAvailable = true;
|
|
257
|
+
let currentDate = new Date(startDate.value);
|
|
258
|
+
|
|
259
|
+
while (currentDate <= endDate.value) {
|
|
260
|
+
if (!isAvailable(currentDate)) {
|
|
261
|
+
allDatesAvailable = false;
|
|
262
|
+
break;
|
|
263
|
+
}
|
|
264
|
+
currentDate.setUTCDate(currentDate.getUTCDate() + 1);
|
|
265
|
+
}
|
|
266
|
+
if (!allDatesAvailable) {
|
|
267
|
+
// Instead of resetting the end date, start a new range
|
|
268
|
+
startDate.value = formattedDate
|
|
269
|
+
endDate.value = null
|
|
270
|
+
dateCalendar.value = { start: formattedDate, end: null }
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
dateCalendar.value = { start: startDate.value, end: endDate.value }
|
|
275
|
+
} else {
|
|
276
|
+
startDate.value = formattedDate
|
|
277
|
+
endDate.value = null
|
|
278
|
+
dateCalendar.value = { start: formattedDate, end: null }
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
const prevMonth = () => {
|
|
283
|
+
// Prevent navigating to past months if disablePastDates is true
|
|
284
|
+
if (props.disablePastDates) {
|
|
285
|
+
const newDate = new Date(Date.UTC(
|
|
286
|
+
currentDate.value.getUTCFullYear(),
|
|
287
|
+
currentDate.value.getUTCMonth() - 1,
|
|
288
|
+
1
|
|
289
|
+
));
|
|
290
|
+
|
|
291
|
+
if (newDate.getUTCFullYear() < today.getUTCFullYear() ||
|
|
292
|
+
(newDate.getUTCFullYear() === today.getUTCFullYear() &&
|
|
293
|
+
newDate.getUTCMonth() < today.getUTCMonth())) {
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
currentDate.value = new Date(Date.UTC(
|
|
299
|
+
currentDate.value.getUTCFullYear(),
|
|
300
|
+
currentDate.value.getUTCMonth() - 1,
|
|
301
|
+
1
|
|
302
|
+
));
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
const nextMonth = () => {
|
|
306
|
+
currentDate.value = new Date(Date.UTC(
|
|
307
|
+
currentDate.value.getUTCFullYear(),
|
|
308
|
+
currentDate.value.getUTCMonth() + 1,
|
|
309
|
+
1
|
|
310
|
+
))
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
const selectToday = () => {
|
|
314
|
+
const today = new Date();
|
|
315
|
+
const todayStart = new Date(Date.UTC(today.getUTCFullYear(), today.getUTCMonth(), today.getUTCDate(), 0, 0, 0, 0));
|
|
316
|
+
const todayEnd = new Date(Date.UTC(today.getUTCFullYear(), today.getUTCMonth(), today.getUTCDate(), 23, 59, 59, 999));
|
|
317
|
+
|
|
318
|
+
// Check if today is available
|
|
319
|
+
if (props.disablePastDates || isAvailable(todayStart)) {
|
|
320
|
+
startDate.value = todayStart.toISOString();
|
|
321
|
+
endDate.value = todayEnd.toISOString();
|
|
322
|
+
dateCalendar.value = { start: startDate.value, end: endDate.value };
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
const selectLastWeek = () => {
|
|
327
|
+
const today = new Date();
|
|
328
|
+
const lastWeek = new Date(today);
|
|
329
|
+
lastWeek.setUTCDate(today.getUTCDate() - 7);
|
|
330
|
+
lastWeek.setUTCHours(0, 0, 0, 0);
|
|
331
|
+
|
|
332
|
+
// Skip if disablePastDates is true
|
|
333
|
+
if (props.disablePastDates) return;
|
|
334
|
+
|
|
335
|
+
startDate.value = lastWeek;
|
|
336
|
+
endDate.value = toEndOfDayUTC(today);
|
|
337
|
+
|
|
338
|
+
today.setUTCHours(23, 59, 59, 999);
|
|
339
|
+
|
|
340
|
+
const start = lastWeek.toISOString();
|
|
341
|
+
const end = today.toISOString();
|
|
342
|
+
|
|
343
|
+
dateCalendar.value = { start: start, end: end };
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
const selectLastMonth = () => {
|
|
347
|
+
const today = new Date();
|
|
348
|
+
|
|
349
|
+
// Skip if disablePastDates is true
|
|
350
|
+
if (props.disablePastDates) return;
|
|
351
|
+
|
|
352
|
+
// Create date for last month
|
|
353
|
+
const lastMonth = new Date(today);
|
|
354
|
+
lastMonth.setUTCMonth(today.getUTCMonth() - 1);
|
|
355
|
+
lastMonth.setUTCHours(0, 0, 0, 0);
|
|
356
|
+
|
|
357
|
+
startDate.value = lastMonth;
|
|
358
|
+
endDate.value = toEndOfDayUTC(today);
|
|
359
|
+
|
|
360
|
+
today.setUTCHours(23, 59, 59, 999);
|
|
361
|
+
|
|
362
|
+
const start = lastMonth.toISOString();
|
|
363
|
+
const end = today.toISOString();
|
|
364
|
+
|
|
365
|
+
dateCalendar.value = { start: start, end: end };
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
const selectLastYear = () => {
|
|
369
|
+
// Skip if disablePastDates is true
|
|
370
|
+
if (props.disablePastDates) return;
|
|
371
|
+
|
|
372
|
+
startDate.value = null;
|
|
373
|
+
endDate.value = null;
|
|
374
|
+
dateCalendar.value = { start: null, end: null };
|
|
375
|
+
}
|
|
376
|
+
</script>
|
|
377
|
+
|
|
378
|
+
|
|
1
379
|
<template>
|
|
2
380
|
<div class="t-noselect calendar" :aria-disabled="disabled">
|
|
3
381
|
<div v-if="allowRange && !disablePastDates" class="br-b br-solid br-grey-transp-25 gap-thin flex flex-nowrap pd-thin">
|
|
@@ -62,383 +440,6 @@
|
|
|
62
440
|
</div>
|
|
63
441
|
</template>
|
|
64
442
|
|
|
65
|
-
<script setup>
|
|
66
|
-
import { computed, ref, watch } from 'vue'
|
|
67
|
-
|
|
68
|
-
const props = defineProps({
|
|
69
|
-
modelValue: [Date, Object],
|
|
70
|
-
allowRange: Boolean,
|
|
71
|
-
disabled: Boolean,
|
|
72
|
-
disablePastDates: {
|
|
73
|
-
type: Boolean,
|
|
74
|
-
default: false
|
|
75
|
-
},
|
|
76
|
-
availabilityData: {
|
|
77
|
-
type: Array,
|
|
78
|
-
default: () => []
|
|
79
|
-
},
|
|
80
|
-
showAvailability: {
|
|
81
|
-
type: Boolean,
|
|
82
|
-
default: false
|
|
83
|
-
},
|
|
84
|
-
lowAvailabilityThreshold: {
|
|
85
|
-
type: Number,
|
|
86
|
-
default: 3
|
|
87
|
-
},
|
|
88
|
-
requiredQuantity: {
|
|
89
|
-
type: Number,
|
|
90
|
-
default: 1
|
|
91
|
-
}
|
|
92
|
-
})
|
|
93
|
-
|
|
94
|
-
const emit = defineEmits(['update:modelValue'])
|
|
95
|
-
|
|
96
|
-
const dateCalendar = defineModel('date')
|
|
97
|
-
|
|
98
|
-
const today = new Date()
|
|
99
|
-
const currentDate = ref(today)
|
|
100
|
-
const selectedDate = ref(null)
|
|
101
|
-
const startDate = ref(null)
|
|
102
|
-
const endDate = ref(null)
|
|
103
|
-
const tooltip = ref({ show: false, message: '', x: 0, y: 0 })
|
|
104
|
-
|
|
105
|
-
const daysOfWeek = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
|
|
106
|
-
|
|
107
|
-
// Watch for availability data updates
|
|
108
|
-
watch(() => props.availabilityData, (newData) => {
|
|
109
|
-
// You could perform additional processing when availability data changes
|
|
110
|
-
}, { deep: true })
|
|
111
|
-
|
|
112
|
-
const toUTC = (date) => {
|
|
113
|
-
return new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()))
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
const toEndOfDayUTC = (date) => {
|
|
117
|
-
const endOfDay = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), 23, 59, 59));
|
|
118
|
-
return endOfDay;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
const dateToString = (date) => {
|
|
122
|
-
return date.toISOString().split('T')[0];
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
const monthYear = computed(() => {
|
|
126
|
-
const month = currentDate.value.toLocaleString('default', { month: 'long', timeZone: 'UTC' })
|
|
127
|
-
const year = currentDate.value.getUTCFullYear()
|
|
128
|
-
return `${month} ${year}`
|
|
129
|
-
})
|
|
130
|
-
|
|
131
|
-
const isPrevMonthDisabled = computed(() => {
|
|
132
|
-
if (!props.disablePastDates) return false;
|
|
133
|
-
|
|
134
|
-
// Check if current view month is the current month
|
|
135
|
-
return currentDate.value.getUTCMonth() === today.getUTCMonth() &&
|
|
136
|
-
currentDate.value.getUTCFullYear() === today.getUTCFullYear();
|
|
137
|
-
})
|
|
138
|
-
|
|
139
|
-
const daysInMonth = computed(() => {
|
|
140
|
-
const days = []
|
|
141
|
-
const firstDay = new Date(Date.UTC(
|
|
142
|
-
currentDate.value.getUTCFullYear(),
|
|
143
|
-
currentDate.value.getUTCMonth(),
|
|
144
|
-
1
|
|
145
|
-
))
|
|
146
|
-
const lastDay = new Date(Date.UTC(
|
|
147
|
-
currentDate.value.getUTCFullYear(),
|
|
148
|
-
currentDate.value.getUTCMonth() + 1,
|
|
149
|
-
0
|
|
150
|
-
))
|
|
151
|
-
|
|
152
|
-
const firstDayOfWeek = firstDay.getUTCDay()
|
|
153
|
-
|
|
154
|
-
let date = new Date(firstDay)
|
|
155
|
-
|
|
156
|
-
date.setUTCDate(date.getUTCDate() - firstDayOfWeek)
|
|
157
|
-
|
|
158
|
-
for (let i = 0; i < firstDayOfWeek; i++) {
|
|
159
|
-
days.push({
|
|
160
|
-
date: new Date(date),
|
|
161
|
-
day: date.getUTCDate(),
|
|
162
|
-
isToday: isToday(date),
|
|
163
|
-
})
|
|
164
|
-
date.setUTCDate(date.getUTCDate() + 1)
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
let day = 1
|
|
168
|
-
|
|
169
|
-
for (date = firstDay; date <= lastDay; date.setUTCDate(date.getUTCDate() + 1)) {
|
|
170
|
-
days.push({
|
|
171
|
-
date: new Date(date),
|
|
172
|
-
day,
|
|
173
|
-
isToday: isToday(date),
|
|
174
|
-
})
|
|
175
|
-
day++
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
const lastDayOfWeek = days[days.length - 1].date.getUTCDay()
|
|
179
|
-
|
|
180
|
-
for (let i = lastDayOfWeek + 1; i <= 6; i++) {
|
|
181
|
-
days.push({
|
|
182
|
-
date: new Date(date),
|
|
183
|
-
day: date.getUTCDate(),
|
|
184
|
-
isToday: isToday(date),
|
|
185
|
-
})
|
|
186
|
-
date.setUTCDate(date.getUTCDate() + 1)
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
return days
|
|
190
|
-
})
|
|
191
|
-
|
|
192
|
-
const isToday = (date) => {
|
|
193
|
-
const today = new Date()
|
|
194
|
-
return (
|
|
195
|
-
date.getUTCDate() === today.getUTCDate() &&
|
|
196
|
-
date.getUTCMonth() === today.getUTCMonth() &&
|
|
197
|
-
date.getUTCFullYear() === today.getUTCFullYear()
|
|
198
|
-
)
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
const isSameMonth = (date) => {
|
|
202
|
-
return (
|
|
203
|
-
date.getUTCMonth() === currentDate.value.getUTCMonth() &&
|
|
204
|
-
date.getUTCFullYear() === currentDate.value.getUTCFullYear()
|
|
205
|
-
)
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
const isPastDate = (date) => {
|
|
209
|
-
if (!props.disablePastDates) return false;
|
|
210
|
-
|
|
211
|
-
const now = new Date();
|
|
212
|
-
// Compare only dates without time
|
|
213
|
-
const todayDate = new Date(Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate()));
|
|
214
|
-
const compareDate = new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate()));
|
|
215
|
-
|
|
216
|
-
return compareDate < todayDate;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
const getAvailabilityInfo = (date) => {
|
|
220
|
-
if (!props.availabilityData || props.availabilityData.length === 0) return null;
|
|
221
|
-
|
|
222
|
-
const dateStr = dateToString(date);
|
|
223
|
-
return props.availabilityData.find(item => item.date === dateStr);
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
const isAvailable = (date) => {
|
|
227
|
-
if (!props.availabilityData || props.availabilityData.length === 0) return true;
|
|
228
|
-
|
|
229
|
-
const availabilityInfo = getAvailabilityInfo(date);
|
|
230
|
-
return !availabilityInfo || availabilityInfo.availableQuantity > 0;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
const isLowAvailability = (date) => {
|
|
234
|
-
if (!props.availabilityData || props.availabilityData.length === 0) return false;
|
|
235
|
-
|
|
236
|
-
const availabilityInfo = getAvailabilityInfo(date);
|
|
237
|
-
return availabilityInfo &&
|
|
238
|
-
availabilityInfo.availableQuantity > 0 &&
|
|
239
|
-
availabilityInfo.availableQuantity <= props.lowAvailabilityThreshold;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
const getAvailability = (date) => {
|
|
243
|
-
if (!props.showAvailability) return null;
|
|
244
|
-
|
|
245
|
-
const availabilityInfo = getAvailabilityInfo(date);
|
|
246
|
-
return availabilityInfo ? availabilityInfo.availableQuantity : null;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
const isSelected = (date) => {
|
|
250
|
-
if (props.allowRange) {
|
|
251
|
-
if (startDate.value && endDate.value) {
|
|
252
|
-
return date >= new Date(startDate.value) && toEndOfDayUTC(date) <= new Date(endDate.value);
|
|
253
|
-
} else if (startDate.value) {
|
|
254
|
-
return date.getTime() === new Date(startDate.value).getTime();
|
|
255
|
-
}
|
|
256
|
-
} else {
|
|
257
|
-
return selectedDate.value && date.getTime() === new Date(selectedDate.value).getTime();
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
const isInRange = (date) => {
|
|
262
|
-
if (startDate.value && endDate.value) {
|
|
263
|
-
return date > startDate.value && toEndOfDayUTC(date) < endDate.value
|
|
264
|
-
}
|
|
265
|
-
return false
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
const selectDate = (date, event) => {
|
|
269
|
-
// Don't allow selection of past dates or unavailable dates
|
|
270
|
-
if (props.disablePastDates && isPastDate(date)) return;
|
|
271
|
-
if (!isAvailable(date)) return;
|
|
272
|
-
|
|
273
|
-
// Check if date has sufficient quantity for required amount
|
|
274
|
-
const availabilityInfo = getAvailabilityInfo(date);
|
|
275
|
-
if (availabilityInfo && availabilityInfo.availableQuantity < props.requiredQuantity) {
|
|
276
|
-
// Show tooltip with insufficient quantity message
|
|
277
|
-
if (event) {
|
|
278
|
-
tooltip.value = {
|
|
279
|
-
show: true,
|
|
280
|
-
message: `Insufficient quantity. Available: ${availabilityInfo.availableQuantity}, needed: ${props.requiredQuantity}`,
|
|
281
|
-
x: event.clientX,
|
|
282
|
-
y: event.clientY
|
|
283
|
-
};
|
|
284
|
-
setTimeout(() => {
|
|
285
|
-
tooltip.value.show = false;
|
|
286
|
-
}, 3000);
|
|
287
|
-
}
|
|
288
|
-
return;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
// Hide tooltip if it was showing
|
|
292
|
-
tooltip.value.show = false;
|
|
293
|
-
|
|
294
|
-
// If selecting a date from another month, switch to that month
|
|
295
|
-
if (!isSameMonth(date)) {
|
|
296
|
-
// currentDate.value = new Date(Date.UTC(
|
|
297
|
-
// date.getUTCFullYear(),
|
|
298
|
-
// date.getUTCMonth(),
|
|
299
|
-
// 1
|
|
300
|
-
// ));
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
const formattedDate = toUTC(date)
|
|
304
|
-
|
|
305
|
-
if (!props.allowRange) {
|
|
306
|
-
selectedDate.value = formattedDate
|
|
307
|
-
dateCalendar.value = formattedDate
|
|
308
|
-
} else if (!startDate.value && !endDate.value) {
|
|
309
|
-
startDate.value = formattedDate
|
|
310
|
-
dateCalendar.value = { start: formattedDate, end: null }
|
|
311
|
-
} else if (!endDate.value) {
|
|
312
|
-
endDate.value = toEndOfDayUTC(date)
|
|
313
|
-
if (formattedDate < startDate.value) {
|
|
314
|
-
const temp = toEndOfDayUTC(startDate.value)
|
|
315
|
-
startDate.value = formattedDate
|
|
316
|
-
endDate.value = temp
|
|
317
|
-
}
|
|
318
|
-
// Verify all dates in the range are available
|
|
319
|
-
if (props.availabilityData && props.availabilityData.length > 0) {
|
|
320
|
-
let allDatesAvailable = true;
|
|
321
|
-
let currentDate = new Date(startDate.value);
|
|
322
|
-
|
|
323
|
-
while (currentDate <= endDate.value) {
|
|
324
|
-
if (!isAvailable(currentDate)) {
|
|
325
|
-
allDatesAvailable = false;
|
|
326
|
-
break;
|
|
327
|
-
}
|
|
328
|
-
currentDate.setUTCDate(currentDate.getUTCDate() + 1);
|
|
329
|
-
}
|
|
330
|
-
if (!allDatesAvailable) {
|
|
331
|
-
// Instead of resetting the end date, start a new range
|
|
332
|
-
startDate.value = formattedDate
|
|
333
|
-
endDate.value = null
|
|
334
|
-
dateCalendar.value = { start: formattedDate, end: null }
|
|
335
|
-
return;
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
dateCalendar.value = { start: startDate.value, end: endDate.value }
|
|
339
|
-
} else {
|
|
340
|
-
startDate.value = formattedDate
|
|
341
|
-
endDate.value = null
|
|
342
|
-
dateCalendar.value = { start: formattedDate, end: null }
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
const prevMonth = () => {
|
|
347
|
-
// Prevent navigating to past months if disablePastDates is true
|
|
348
|
-
if (props.disablePastDates) {
|
|
349
|
-
const newDate = new Date(Date.UTC(
|
|
350
|
-
currentDate.value.getUTCFullYear(),
|
|
351
|
-
currentDate.value.getUTCMonth() - 1,
|
|
352
|
-
1
|
|
353
|
-
));
|
|
354
|
-
|
|
355
|
-
if (newDate.getUTCFullYear() < today.getUTCFullYear() ||
|
|
356
|
-
(newDate.getUTCFullYear() === today.getUTCFullYear() &&
|
|
357
|
-
newDate.getUTCMonth() < today.getUTCMonth())) {
|
|
358
|
-
return;
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
currentDate.value = new Date(Date.UTC(
|
|
363
|
-
currentDate.value.getUTCFullYear(),
|
|
364
|
-
currentDate.value.getUTCMonth() - 1,
|
|
365
|
-
1
|
|
366
|
-
));
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
const nextMonth = () => {
|
|
370
|
-
currentDate.value = new Date(Date.UTC(
|
|
371
|
-
currentDate.value.getUTCFullYear(),
|
|
372
|
-
currentDate.value.getUTCMonth() + 1,
|
|
373
|
-
1
|
|
374
|
-
))
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
const selectToday = () => {
|
|
378
|
-
const today = new Date();
|
|
379
|
-
const todayStart = new Date(Date.UTC(today.getUTCFullYear(), today.getUTCMonth(), today.getUTCDate(), 0, 0, 0, 0));
|
|
380
|
-
const todayEnd = new Date(Date.UTC(today.getUTCFullYear(), today.getUTCMonth(), today.getUTCDate(), 23, 59, 59, 999));
|
|
381
|
-
|
|
382
|
-
// Check if today is available
|
|
383
|
-
if (props.disablePastDates || isAvailable(todayStart)) {
|
|
384
|
-
startDate.value = todayStart.toISOString();
|
|
385
|
-
endDate.value = todayEnd.toISOString();
|
|
386
|
-
dateCalendar.value = { start: startDate.value, end: endDate.value };
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
const selectLastWeek = () => {
|
|
391
|
-
const today = new Date();
|
|
392
|
-
const lastWeek = new Date(today);
|
|
393
|
-
lastWeek.setUTCDate(today.getUTCDate() - 7);
|
|
394
|
-
lastWeek.setUTCHours(0, 0, 0, 0);
|
|
395
|
-
|
|
396
|
-
// Skip if disablePastDates is true
|
|
397
|
-
if (props.disablePastDates) return;
|
|
398
|
-
|
|
399
|
-
startDate.value = lastWeek;
|
|
400
|
-
endDate.value = toEndOfDayUTC(today);
|
|
401
|
-
|
|
402
|
-
today.setUTCHours(23, 59, 59, 999);
|
|
403
|
-
|
|
404
|
-
const start = lastWeek.toISOString();
|
|
405
|
-
const end = today.toISOString();
|
|
406
|
-
|
|
407
|
-
dateCalendar.value = { start: start, end: end };
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
const selectLastMonth = () => {
|
|
411
|
-
const today = new Date();
|
|
412
|
-
|
|
413
|
-
// Skip if disablePastDates is true
|
|
414
|
-
if (props.disablePastDates) return;
|
|
415
|
-
|
|
416
|
-
// Create date for last month
|
|
417
|
-
const lastMonth = new Date(today);
|
|
418
|
-
lastMonth.setUTCMonth(today.getUTCMonth() - 1);
|
|
419
|
-
lastMonth.setUTCHours(0, 0, 0, 0);
|
|
420
|
-
|
|
421
|
-
startDate.value = lastMonth;
|
|
422
|
-
endDate.value = toEndOfDayUTC(today);
|
|
423
|
-
|
|
424
|
-
today.setUTCHours(23, 59, 59, 999);
|
|
425
|
-
|
|
426
|
-
const start = lastMonth.toISOString();
|
|
427
|
-
const end = today.toISOString();
|
|
428
|
-
|
|
429
|
-
dateCalendar.value = { start: start, end: end };
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
const selectLastYear = () => {
|
|
433
|
-
// Skip if disablePastDates is true
|
|
434
|
-
if (props.disablePastDates) return;
|
|
435
|
-
|
|
436
|
-
startDate.value = null;
|
|
437
|
-
endDate.value = null;
|
|
438
|
-
dateCalendar.value = { start: null, end: null };
|
|
439
|
-
}
|
|
440
|
-
</script>
|
|
441
|
-
|
|
442
443
|
<style lang='scss' scoped>
|
|
443
444
|
.calendar[aria-disabled="true"] {
|
|
444
445
|
cursor: not-allowed;
|