@devvistatech/devvista-kit 0.0.10 → 0.0.13
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/CHANGELOG.md +12 -12
- package/LICENSE +6 -6
- package/README.md +55 -15
- package/app/ClientLayout.tsx +66 -0
- package/app/about/page.tsx +61 -298
- package/app/adRequest/page.tsx +625 -549
- package/app/admin-profile/page.tsx +123 -0
- package/app/analytics/page.tsx +382 -346
- package/app/api/about/route.ts +290 -306
- package/app/api/adRequest/route.ts +547 -567
- package/app/api/analytics/[reportType]/route.ts +274 -337
- package/app/api/bio/route.ts +297 -313
- package/app/api/blog/route.ts +288 -306
- package/app/api/chat/route.ts +14 -14
- package/app/api/contact/route.ts +409 -409
- package/app/api/contacts/route.ts +179 -224
- package/app/api/files/route.ts +415 -429
- package/app/api/gallery-data/route.ts +727 -735
- package/app/api/schedule/route.ts +439 -455
- package/app/api/signup/route.ts +129 -0
- package/app/api/sync-user/route.ts +306 -132
- package/app/api/trial-request/route.ts +297 -297
- package/app/api/verify-admin/route.ts +46 -0
- package/app/blog/[id]/page.tsx +307 -288
- package/app/blog/page.tsx +249 -216
- package/app/contact/page.tsx +284 -284
- package/app/faq/page.tsx +191 -191
- package/app/favicon.ico +0 -0
- package/app/gallery/page.tsx +336 -315
- package/app/globals.css +58 -58
- package/app/layout.tsx +59 -110
- package/app/not-found.tsx +20 -20
- package/app/page.tsx +47 -338
- package/app/products/constants/product.ts +27 -0
- package/app/products/page.tsx +296 -0
- package/app/products/productOne/page.tsx +266 -0
- package/app/products/productTwo/page.tsx +272 -0
- package/app/schedule/page.tsx +698 -660
- package/bin/init.js +207 -219
- package/components/addOns/functional/CalendlyWidget.tsx +107 -107
- package/components/addOns/functional/ClassList.tsx +149 -145
- package/components/addOns/functional/ClassPopup.tsx +398 -398
- package/components/addOns/functional/ContactForm.tsx +284 -284
- package/components/addOns/functional/NewUserAnalytics.tsx +100 -100
- package/components/addOns/functional/ProductList.tsx +1027 -0
- package/components/addOns/functional/aboutSections/AboutSection.tsx +581 -544
- package/components/addOns/functional/aboutSections/constants/aboutSection.ts +70 -65
- package/components/addOns/functional/banner/Banner.tsx +150 -0
- package/components/addOns/functional/banner/BannerDashboard.tsx +283 -0
- package/components/addOns/functional/bioSections/BioEditor.tsx +471 -0
- package/components/addOns/functional/bioSections/constants/bioEditor.ts +36 -0
- package/components/addOns/functional/blogSections/BlogDashboard.tsx +184 -184
- package/components/addOns/functional/blogSections/BlogFormPopUp.tsx +555 -554
- package/components/addOns/functional/blogSections/BlogList.tsx +148 -148
- package/components/addOns/functional/blogSections/BlogSidebar.tsx +58 -58
- package/components/addOns/functional/blogSections/constants/blogDashboard.ts +28 -28
- package/components/addOns/functional/blogSections/constants/blogFormPopUp.ts +97 -97
- package/components/addOns/functional/blogSections/constants/blogList.ts +22 -22
- package/components/addOns/functional/blogSections/constants/blogSidebar.ts +15 -15
- package/components/addOns/functional/{ImageDescCarousel.tsx → carousels/ImageDescCarousel.tsx} +839 -730
- package/components/addOns/functional/carousels/ProductDescCarousel.tsx +1129 -0
- package/components/addOns/functional/{ScheduleCarousel.tsx → carousels/ScheduleCarousel.tsx} +231 -171
- package/components/addOns/functional/carousels/constants.ts/productDescCarousel.ts +197 -0
- package/components/addOns/functional/carousels/constants.ts/scheduleCarousel.ts +20 -0
- package/components/addOns/functional/contactsDashboard/ContactsDashboard.tsx +366 -366
- package/components/addOns/functional/contactsDashboard/constants/contactsDashboard.ts +70 -70
- package/components/addOns/functional/fileUploaders/FileUploader.tsx +437 -0
- package/components/addOns/functional/fileUploaders/constants/fileUploader.ts +45 -0
- package/components/addOns/functional/galleries/GalleryComplex.tsx +1037 -836
- package/components/addOns/functional/galleries/GallerySimple.tsx +537 -509
- package/components/addOns/functional/galleries/ThreeSetGallery.tsx +260 -0
- package/components/addOns/functional/galleries/constants/galleryComplex.ts +106 -106
- package/components/addOns/functional/galleries/constants/gallerySimple.ts +76 -76
- package/components/addOns/functional/schedules/ScheduleGridOne.tsx +276 -262
- package/components/addOns/functional/schedules/ScheduleGridTwo.tsx +299 -294
- package/components/addOns/functional/schedules/ScheduleGridTwoBasic.tsx +293 -288
- package/components/addOns/functional/schedules/SchedulerForm.tsx +428 -428
- package/components/addOns/functional/schedules/constants/ScheduleGridTwo.ts +40 -40
- package/components/addOns/functional/schedules/constants/ScheduleGridTwoBasic.ts +40 -40
- package/components/addOns/functional/schedules/constants/SchedulerForm.ts +65 -65
- package/components/addOns/functional/schedules/constants/scheduleGridOne.ts +54 -54
- package/components/addOns/non-functional/AnnouncementBanner.tsx +46 -46
- package/components/addOns/non-functional/IconBubble.tsx +49 -49
- package/components/addOns/non-functional/SampleCarousel.tsx +204 -204
- package/components/addOns/non-functional/Testimonials.tsx +334 -334
- package/components/addOns/non-functional/ThreeSetGallery.tsx +63 -63
- package/components/addOns/non-functional/aboutSections/AboutSection.tsx +62 -62
- package/components/addOns/non-functional/aboutSections/constants/aboutSection.ts +24 -24
- package/components/addOns/non-functional/featureSections/FeaturesSection.tsx +74 -0
- package/components/addOns/non-functional/featureSections/constants/featuresSection.ts +30 -0
- package/components/addOns/non-functional/{Heros/HeroSection.tsx → heros/HomeHero.tsx} +144 -142
- package/components/addOns/non-functional/heros/ProductHero.tsx +111 -0
- package/components/addOns/non-functional/heros/constants/hero.ts +62 -0
- package/components/addOns/non-functional/imageCarousels/ProductSlider.tsx +117 -117
- package/components/addOns/non-functional/imageCarousels/ProgramCarousel.tsx +232 -232
- package/components/addOns/non-functional/imageCarousels/constants/programCarousel.ts +39 -39
- package/components/addOns/non-functional/imageCarousels/constants/programSlider.ts +36 -36
- package/components/addOns/non-functional/spinner.tsx +21 -21
- package/components/footers/footer.tsx +416 -453
- package/components/navBars/navbar.tsx +310 -310
- package/components/other/accordion.tsx +58 -58
- package/components/other/admin-menu.tsx +68 -68
- package/components/other/alert-dialog.tsx +141 -141
- package/components/other/alert.tsx +59 -59
- package/components/other/aspect-ratio.tsx +7 -7
- package/components/other/avatar.tsx +50 -50
- package/components/other/badge.tsx +36 -36
- package/components/other/breadcrumb.tsx +115 -115
- package/components/other/button.tsx +738 -738
- package/components/other/calendar.tsx +66 -66
- package/components/other/card.tsx +86 -86
- package/components/other/carousel.tsx +274 -274
- package/components/other/chart.tsx +363 -363
- package/components/other/checkbox.tsx +30 -30
- package/components/other/collapsible.tsx +11 -11
- package/components/other/command.tsx +155 -155
- package/components/other/context-menu.tsx +200 -200
- package/components/other/dialog.tsx +122 -122
- package/components/other/drawer.tsx +118 -118
- package/components/other/dropdown-menu.tsx +200 -200
- package/components/other/form.tsx +179 -179
- package/components/other/hover-card.tsx +29 -29
- package/components/other/input-otp.tsx +71 -71
- package/components/other/input.tsx +25 -25
- package/components/other/label.tsx +26 -26
- package/components/other/menubar.tsx +236 -236
- package/components/other/mobile-icon.tsx +21 -21
- package/components/other/navigation-menu.tsx +128 -128
- package/components/other/pagination.tsx +117 -117
- package/components/other/popover.tsx +31 -31
- package/components/other/progress.tsx +28 -28
- package/components/other/radio-group.tsx +44 -44
- package/components/other/resizable.tsx +45 -45
- package/components/other/scroll-area.tsx +48 -48
- package/components/other/select.tsx +160 -160
- package/components/other/separator.tsx +31 -31
- package/components/other/sheet.tsx +140 -140
- package/components/other/skeleton.tsx +15 -15
- package/components/other/slider.tsx +28 -28
- package/components/other/social-icons.tsx +39 -39
- package/components/other/sonner.tsx +31 -31
- package/components/other/switch.tsx +29 -29
- package/components/other/table.tsx +117 -117
- package/components/other/tabs.tsx +55 -55
- package/components/other/textarea.tsx +24 -24
- package/components/other/toast.tsx +122 -122
- package/components/other/toaster.tsx +35 -35
- package/components/other/toggle-group.tsx +61 -61
- package/components/other/toggle.tsx +45 -45
- package/components/other/tooltip.tsx +30 -30
- package/components/theme-provider.tsx +8 -8
- package/hooks/use-toast.ts +188 -188
- package/lib/auth/auth-context.tsx +225 -0
- package/lib/auth/auth-utils.tsx +30 -0
- package/lib/constants/about.ts +34 -34
- package/lib/constants/adRequest.ts +256 -113
- package/lib/constants/admin-profile.ts +12 -0
- package/lib/constants/contact.ts +40 -40
- package/lib/constants/faq.ts +34 -34
- package/lib/constants/gallery.ts +42 -42
- package/lib/constants/page.ts +69 -69
- package/lib/constants/schedule.ts +71 -71
- package/lib/google/google-analytics-tracking.tsx +44 -0
- package/lib/{google-analytics.tsx → google/google-analytics.tsx} +97 -97
- package/lib/types.ts +235 -0
- package/lib/utils/compressImage.tsx +32 -0
- package/middleware.ts +46 -42
- package/netlify.toml +5 -5
- package/next.config.js +10 -10
- package/package.json +117 -116
- package/public/images/test.png +0 -0
- package/tailwind.config.ts +89 -89
- package/tsconfig.json +23 -23
- package/components/addOns/functional/BioEditor.tsx +0 -447
- package/components/addOns/functional/FileUploader.tsx +0 -295
- package/components/addOns/non-functional/FeaturesSection.tsx +0 -63
- package/components/types.ts +0 -50
- package/dist/.next/types/app/api/about/route.js +0 -52
- package/dist/.next/types/app/api/blog/route.js +0 -52
- package/dist/.next/types/app/api/files/route.js +0 -52
- package/dist/.next/types/app/api/schedule/route.js +0 -52
- package/dist/.next/types/app/api/sync-user/route.js +0 -52
- package/dist/.next/types/app/layout.js +0 -22
- package/dist/.next/types/app/page.js +0 -22
- package/dist/app/about/page.jsx +0 -258
- package/dist/app/adRequest/page.jsx +0 -531
- package/dist/app/analytics/page.jsx +0 -298
- package/dist/app/api/about/route.js +0 -285
- package/dist/app/api/adRequest/route.js +0 -440
- package/dist/app/api/analytics/[reportType]/route.js +0 -357
- package/dist/app/api/bio/route.js +0 -293
- package/dist/app/api/blog/route.js +0 -366
- package/dist/app/api/chat/route.js +0 -58
- package/dist/app/api/contact/route.js +0 -163
- package/dist/app/api/contacts/route.js +0 -234
- package/dist/app/api/files/route.js +0 -444
- package/dist/app/api/gallery-data/route.js +0 -719
- package/dist/app/api/schedule/route.js +0 -461
- package/dist/app/api/sync-user/route.js +0 -186
- package/dist/app/api/trial-request/route.js +0 -165
- package/dist/app/blog/[id]/page.jsx +0 -312
- package/dist/app/blog/page.jsx +0 -210
- package/dist/app/constants/about.js +0 -32
- package/dist/app/constants/adRequest.js +0 -113
- package/dist/app/constants/contact.js +0 -40
- package/dist/app/constants/faq.js +0 -36
- package/dist/app/constants/gallery.js +0 -42
- package/dist/app/constants/page.js +0 -69
- package/dist/app/constants/schedule.js +0 -71
- package/dist/app/contact/page.jsx +0 -119
- package/dist/app/faq/page.jsx +0 -97
- package/dist/app/gallery/page.jsx +0 -281
- package/dist/app/layout.jsx +0 -45
- package/dist/app/not-found.jsx +0 -14
- package/dist/app/page.jsx +0 -324
- package/dist/app/schedule/page.jsx +0 -500
- package/dist/components/addOns/functional/BioEditor.jsx +0 -187
- package/dist/components/addOns/functional/CalendlyWidget.jsx +0 -61
- package/dist/components/addOns/functional/ClassList.jsx +0 -158
- package/dist/components/addOns/functional/ClassPopup.jsx +0 -300
- package/dist/components/addOns/functional/ContactForm.jsx +0 -219
- package/dist/components/addOns/functional/FileUploader.jsx +0 -222
- package/dist/components/addOns/functional/ImageDescCarousel.jsx +0 -491
- package/dist/components/addOns/functional/NewUserAnalytics.jsx +0 -71
- package/dist/components/addOns/functional/ScheduleCarousel.jsx +0 -68
- package/dist/components/addOns/functional/aboutSections/AboutSection.jsx +0 -372
- package/dist/components/addOns/functional/aboutSections/constants/aboutSection.js +0 -65
- package/dist/components/addOns/functional/blogSections/BlogDashboard.jsx +0 -111
- package/dist/components/addOns/functional/blogSections/BlogFormPopUp.jsx +0 -465
- package/dist/components/addOns/functional/blogSections/BlogList.jsx +0 -170
- package/dist/components/addOns/functional/blogSections/BlogSidebar.jsx +0 -35
- package/dist/components/addOns/functional/blogSections/constants/blogDashboard.js +0 -28
- package/dist/components/addOns/functional/blogSections/constants/blogFormPopUp.js +0 -97
- package/dist/components/addOns/functional/blogSections/constants/blogList.js +0 -22
- package/dist/components/addOns/functional/blogSections/constants/blogSidebar.js +0 -15
- package/dist/components/addOns/functional/contactsDashboard/ContactsDashboard.jsx +0 -355
- package/dist/components/addOns/functional/contactsDashboard/constants/contactsDashboard.js +0 -70
- package/dist/components/addOns/functional/galleries/GalleryComplex.jsx +0 -605
- package/dist/components/addOns/functional/galleries/GallerySimple.jsx +0 -363
- package/dist/components/addOns/functional/galleries/constants/galleryComplex.js +0 -106
- package/dist/components/addOns/functional/galleries/constants/gallerySimple.js +0 -76
- package/dist/components/addOns/functional/schedules/ScheduleGridOne.jsx +0 -167
- package/dist/components/addOns/functional/schedules/ScheduleGridTwo.jsx +0 -100
- package/dist/components/addOns/functional/schedules/ScheduleGridTwoBasic.jsx +0 -97
- package/dist/components/addOns/functional/schedules/SchedulerForm.jsx +0 -188
- package/dist/components/addOns/functional/schedules/constants/ScheduleGridTwo.js +0 -40
- package/dist/components/addOns/functional/schedules/constants/ScheduleGridTwoBasic.js +0 -40
- package/dist/components/addOns/functional/schedules/constants/SchedulerForm.js +0 -65
- package/dist/components/addOns/functional/schedules/constants/scheduleGridOne.js +0 -54
- package/dist/components/addOns/non-functional/AnnouncementBanner.jsx +0 -24
- package/dist/components/addOns/non-functional/FeaturesSection.jsx +0 -38
- package/dist/components/addOns/non-functional/HeroSection.jsx +0 -71
- package/dist/components/addOns/non-functional/Heros/HeroSection.jsx +0 -71
- package/dist/components/addOns/non-functional/IconBubble.jsx +0 -36
- package/dist/components/addOns/non-functional/SampleCarousel.jsx +0 -114
- package/dist/components/addOns/non-functional/Testimonials.jsx +0 -177
- package/dist/components/addOns/non-functional/ThreeSetGallery.jsx +0 -40
- package/dist/components/addOns/non-functional/aboutSections/AboutSection.jsx +0 -35
- package/dist/components/addOns/non-functional/aboutSections/constants/aboutSection.js +0 -24
- package/dist/components/addOns/non-functional/imageCarousels/ProductSlider.jsx +0 -80
- package/dist/components/addOns/non-functional/imageCarousels/ProgramCarousel.jsx +0 -155
- package/dist/components/addOns/non-functional/imageCarousels/constants/programCarousel.js +0 -39
- package/dist/components/addOns/non-functional/imageCarousels/constants/programSlider.js +0 -36
- package/dist/components/addOns/non-functional/spinner.jsx +0 -13
- package/dist/components/footers/footer.jsx +0 -217
- package/dist/components/navBars/navbar.jsx +0 -159
- package/dist/components/other/accordion.jsx +0 -40
- package/dist/components/other/admin-menu.jsx +0 -34
- package/dist/components/other/alert-dialog.jsx +0 -64
- package/dist/components/other/alert.jsx +0 -41
- package/dist/components/other/aspect-ratio.jsx +0 -4
- package/dist/components/other/avatar.jsx +0 -31
- package/dist/components/other/badge.jsx +0 -32
- package/dist/components/other/breadcrumb.jsx +0 -57
- package/dist/components/other/button.jsx +0 -322
- package/dist/components/other/calendar.jsx +0 -43
- package/dist/components/other/card.jsx +0 -44
- package/dist/components/other/carousel.jsx +0 -140
- package/dist/components/other/chart.jsx +0 -182
- package/dist/components/other/checkbox.jsx +0 -26
- package/dist/components/other/collapsible.jsx +0 -6
- package/dist/components/other/command.jsx +0 -68
- package/dist/components/other/context-menu.jsx +0 -88
- package/dist/components/other/dialog.jsx +0 -60
- package/dist/components/other/drawer.jsx +0 -60
- package/dist/components/other/dropdown-menu.jsx +0 -90
- package/dist/components/other/form.jsx +0 -89
- package/dist/components/other/hover-card.jsx +0 -23
- package/dist/components/other/input-otp.jsx +0 -46
- package/dist/components/other/input.jsx +0 -19
- package/dist/components/other/label.jsx +0 -23
- package/dist/components/other/login-popup.jsx +0 -1
- package/dist/components/other/menubar.jsx +0 -96
- package/dist/components/other/mobile-icon.jsx +0 -11
- package/dist/components/other/navigation-menu.jsx +0 -62
- package/dist/components/other/pagination.jsx +0 -63
- package/dist/components/other/popover.jsx +0 -25
- package/dist/components/other/progress.jsx +0 -23
- package/dist/components/other/radio-group.jsx +0 -31
- package/dist/components/other/resizable.jsx +0 -29
- package/dist/components/other/scroll-area.jsx +0 -36
- package/dist/components/other/select.jsx +0 -83
- package/dist/components/other/separator.jsx +0 -21
- package/dist/components/other/sheet.jsx +0 -74
- package/dist/components/other/signup-popup.jsx +0 -1
- package/dist/components/other/skeleton.jsx +0 -17
- package/dist/components/other/slider.jsx +0 -26
- package/dist/components/other/social-icons.jsx +0 -15
- package/dist/components/other/sonner.jsx +0 -27
- package/dist/components/other/switch.jsx +0 -23
- package/dist/components/other/table.jsx +0 -56
- package/dist/components/other/tabs.jsx +0 -32
- package/dist/components/other/textarea.jsx +0 -19
- package/dist/components/other/toast.jsx +0 -58
- package/dist/components/other/toaster.jsx +0 -31
- package/dist/components/other/toggle-group.jsx +0 -41
- package/dist/components/other/toggle.jsx +0 -39
- package/dist/components/other/tooltip.jsx +0 -24
- package/dist/components/theme-provider.jsx +0 -18
- package/dist/components/types.js +0 -1
- package/dist/hooks/use-toast.js +0 -135
- package/dist/lib/auth-context.jsx +0 -144
- package/dist/lib/constants/about.js +0 -32
- package/dist/lib/constants/adRequest.js +0 -113
- package/dist/lib/constants/contact.js +0 -40
- package/dist/lib/constants/faq.js +0 -36
- package/dist/lib/constants/gallery.js +0 -42
- package/dist/lib/constants/page.js +0 -69
- package/dist/lib/constants/schedule.js +0 -71
- package/dist/lib/google-analytics.jsx +0 -148
- package/dist/lib/utils.js +0 -9
- package/dist/lib/verify-user.js +0 -142
- package/dist/middleware.js +0 -37
- package/dist/tailwind.config.js +0 -86
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/lib/auth-context.tsx +0 -131
- package/lib/verify-user.ts +0 -118
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
// src/pages/ScheduleGridOne.tsx
|
|
2
|
-
"use client";
|
|
3
|
-
import React, { useState, useMemo } from "react";
|
|
4
|
-
import { AddButton, SubmitButton, DeleteIconButton } from "@/components/other/button";
|
|
5
|
-
import { ClassPopup } from "../ClassPopup";
|
|
6
|
-
import { SCHEDULE_GRID_ONE } from "./constants/scheduleGridOne";
|
|
7
|
-
var ScheduleGrid = function (_a) {
|
|
8
|
-
var schedule = _a.schedule, isAdmin = _a.isAdmin, error = _a.error, openModal = _a.openModal, openConfirmDelete = _a.openConfirmDelete, formatTime = _a.formatTime;
|
|
9
|
-
var _b = useState(""), searchQuery = _b[0], setSearchQuery = _b[1];
|
|
10
|
-
var _c = useState(""), timeFilter = _c[0], setTimeFilter = _c[1];
|
|
11
|
-
var _d = useState(false), isPopupOpen = _d[0], setIsPopupOpen = _d[1];
|
|
12
|
-
var _e = useState(null), selectedClass = _e[0], setSelectedClass = _e[1];
|
|
13
|
-
var daysOfWeek = SCHEDULE_GRID_ONE.UI.DAYS_OF_WEEK;
|
|
14
|
-
var timeRanges = [
|
|
15
|
-
SCHEDULE_GRID_ONE.UI.MORNING_OPTION,
|
|
16
|
-
SCHEDULE_GRID_ONE.UI.AFTERNOON_OPTION,
|
|
17
|
-
SCHEDULE_GRID_ONE.UI.EVENING_OPTION,
|
|
18
|
-
];
|
|
19
|
-
var parseTimeTo24Hour = function (time) {
|
|
20
|
-
try {
|
|
21
|
-
var _a = time.split(" "), timePart = _a[0], period = _a[1];
|
|
22
|
-
var _b = timePart.split(":").map(Number), hours = _b[0], minutes = _b[1];
|
|
23
|
-
if (period === "PM" && hours !== 12)
|
|
24
|
-
hours += 12;
|
|
25
|
-
if (period === "AM" && hours === 12)
|
|
26
|
-
hours = 0;
|
|
27
|
-
return hours + minutes / 60;
|
|
28
|
-
}
|
|
29
|
-
catch (_c) {
|
|
30
|
-
return 0;
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
var filteredSchedule = useMemo(function () {
|
|
34
|
-
var filtered = {};
|
|
35
|
-
Object.entries(schedule).forEach(function (_a) {
|
|
36
|
-
var day = _a[0], classes = _a[1];
|
|
37
|
-
filtered[day] = classes.filter(function (cls) {
|
|
38
|
-
if (searchQuery && !cls.name.toLowerCase().includes(searchQuery.toLowerCase()))
|
|
39
|
-
return false;
|
|
40
|
-
if (timeFilter) {
|
|
41
|
-
var startHour = parseTimeTo24Hour(formatTime(cls.startTime));
|
|
42
|
-
if (timeFilter === SCHEDULE_GRID_ONE.UI.MORNING_OPTION && startHour >= 12)
|
|
43
|
-
return false;
|
|
44
|
-
if (timeFilter === SCHEDULE_GRID_ONE.UI.AFTERNOON_OPTION && (startHour < 12 || startHour >= 17))
|
|
45
|
-
return false;
|
|
46
|
-
if (timeFilter === SCHEDULE_GRID_ONE.UI.EVENING_OPTION && startHour < 17)
|
|
47
|
-
return false;
|
|
48
|
-
}
|
|
49
|
-
return true;
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
return filtered;
|
|
53
|
-
}, [schedule, searchQuery, timeFilter, formatTime]);
|
|
54
|
-
var resetFilters = function () {
|
|
55
|
-
setSearchQuery("");
|
|
56
|
-
setTimeFilter("");
|
|
57
|
-
};
|
|
58
|
-
var handleClassClick = function (cls, day) {
|
|
59
|
-
if (!isAdmin) {
|
|
60
|
-
setSelectedClass({
|
|
61
|
-
id: cls.documentId,
|
|
62
|
-
title: cls.name,
|
|
63
|
-
time: "".concat(formatTime(cls.startTime), " - ").concat(formatTime(cls.endTime)),
|
|
64
|
-
day: day,
|
|
65
|
-
ageGroup: SCHEDULE_GRID_ONE.UI.ALL_AGES_TEXT,
|
|
66
|
-
});
|
|
67
|
-
setIsPopupOpen(true);
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
openModal(cls, day);
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
return (<div className="w-full max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-16">
|
|
74
|
-
<style jsx global>{"\n @import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap\");\n * {\n font-family: \"Inter\", system-ui, sans-serif;\n box-sizing: border-box;\n }\n "}</style>
|
|
75
|
-
|
|
76
|
-
<div className="bg-white/10 backdrop-blur-lg border border-white/20 p-4 rounded-2xl mb-6 shadow-[0_8px_32px_rgba(0,0,0,0.2)]">
|
|
77
|
-
<div className="grid gap-4 sm:grid-cols-2">
|
|
78
|
-
<div>
|
|
79
|
-
<label className="block text-md font-medium text-white mb-1">{SCHEDULE_GRID_ONE.UI.SEARCH_LABEL}</label>
|
|
80
|
-
<input type="text" value={searchQuery} onChange={function (e) { return setSearchQuery(e.target.value); }} placeholder={SCHEDULE_GRID_ONE.UI.SEARCH_PLACEHOLDER} className="w-full p-2 rounded bg-gray-400 text-white border border-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-500 placeholder-white"/>
|
|
81
|
-
</div>
|
|
82
|
-
<div>
|
|
83
|
-
<label className="block text-md font-medium text-white mb-1">{SCHEDULE_GRID_ONE.UI.TIME_FILTER_LABEL}</label>
|
|
84
|
-
<select value={timeFilter} onChange={function (e) { return setTimeFilter(e.target.value); }} className="w-full p-2 rounded bg-gray-400 text-white border border-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-500 placeholder-white">
|
|
85
|
-
<option value="">{SCHEDULE_GRID_ONE.UI.ALL_TIMES_OPTION}</option>
|
|
86
|
-
{timeRanges.map(function (time) { return (<option key={time} value={time}>
|
|
87
|
-
{time}
|
|
88
|
-
</option>); })}
|
|
89
|
-
</select>
|
|
90
|
-
</div>
|
|
91
|
-
</div>
|
|
92
|
-
<SubmitButton onClick={resetFilters} className="mt-4">
|
|
93
|
-
{SCHEDULE_GRID_ONE.BUTTONS.RESET_FILTERS_BUTTON}
|
|
94
|
-
</SubmitButton>
|
|
95
|
-
</div>
|
|
96
|
-
|
|
97
|
-
<div className="flex justify-between items-center mb-6">
|
|
98
|
-
<h2 className="text-2xl sm:text-3xl lg:text-4xl text-white font-black tracking-wide drop-shadow-md" style={{
|
|
99
|
-
textShadow: "\n -1px -1px 0 #000,\n 1px -1px 0 #000,\n -1px 1px 0 #000,\n 1px 1px 0 #000,\n 0 2px 4px rgba(0, 0, 0, 0.4)\n ",
|
|
100
|
-
}}>
|
|
101
|
-
{SCHEDULE_GRID_ONE.UI.CLASS_SCHEDULE_HEADING}
|
|
102
|
-
</h2>
|
|
103
|
-
{isAdmin && (<AddButton onClick={function () { return openModal(); }}>
|
|
104
|
-
{SCHEDULE_GRID_ONE.BUTTONS.ADD_NEW_CLASS_BUTTON}
|
|
105
|
-
</AddButton>)}
|
|
106
|
-
</div>
|
|
107
|
-
|
|
108
|
-
{error ? (<div className="text-center text-red-400 text-xl sm:text-2xl font-bold">{error}</div>) : (<div className="bg-white/10 backdrop-blur-lg border border-white/20 rounded-2xl p-6 shadow-[0_8px_32px_rgba(0,0,0,0.2)]">
|
|
109
|
-
<div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
|
|
110
|
-
{daysOfWeek.map(function (day, index) {
|
|
111
|
-
var classes = filteredSchedule[day] || [];
|
|
112
|
-
return (<div key={day} className="p-4 flex flex-col min-w-0">
|
|
113
|
-
<h3 className="text-lg font-bold text-white mb-3 text-center p-2" style={{
|
|
114
|
-
textShadow: "\n -1px -1px 0 #000,\n 1px -1px 0 #000,\n -1px 1px 0 #000,\n 1px 1px 0 #000,\n 0 2px 4px rgba(0, 0, 0, 0.4)\n ",
|
|
115
|
-
}}>
|
|
116
|
-
{day}
|
|
117
|
-
</h3>
|
|
118
|
-
<ul className="space-y-3 font-medium flex-1">
|
|
119
|
-
{classes.length > 0 ? (classes.map(function (cls) { return (<li key={"".concat(cls.startTime, "-").concat(cls.endTime, "-").concat(cls.id)} className={"bg-white/12 backdrop-blur-lg border border-white/20 rounded-lg p-3 shadow-[0_4px_20px_rgba(0,0,0,0.15)] relative cursor-pointer hover:bg-blue-600/20"} onClick={function () { return handleClassClick(cls, day); }} role="button" tabIndex={0} onKeyDown={function (e) {
|
|
120
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
121
|
-
e.preventDefault();
|
|
122
|
-
handleClassClick(cls, day);
|
|
123
|
-
}
|
|
124
|
-
}}>
|
|
125
|
-
<div className="flex flex-col space-y-1">
|
|
126
|
-
<span className="font-bold text-2xl sm:text-xl md:text-lg lg:text-2xl text-[#FF69B4]">
|
|
127
|
-
{cls.name}
|
|
128
|
-
</span>
|
|
129
|
-
<div className="flex flex-col text-white text-2xl sm:text-xl md:text-lg lg:text-2xl">
|
|
130
|
-
<span>
|
|
131
|
-
{formatTime(cls.startTime)} - {formatTime(cls.endTime)}
|
|
132
|
-
</span>
|
|
133
|
-
</div>
|
|
134
|
-
{isAdmin && (<DeleteIconButton onClick={function (e) {
|
|
135
|
-
e.stopPropagation();
|
|
136
|
-
openConfirmDelete(cls.id, cls.documentId, day);
|
|
137
|
-
}} aria-label={SCHEDULE_GRID_ONE.UI.DELETE_BUTTON_ARIA.replace("${cls.name}", cls.name)}/>)}
|
|
138
|
-
</div>
|
|
139
|
-
</li>); })) : (<li className="text-center text-2xl sm:text-xl md:text-lg lg:text-2xl">
|
|
140
|
-
{SCHEDULE_GRID_ONE.UI.NO_CLASSES_MESSAGE}
|
|
141
|
-
</li>)}
|
|
142
|
-
</ul>
|
|
143
|
-
</div>);
|
|
144
|
-
})}
|
|
145
|
-
</div>
|
|
146
|
-
</div>)}
|
|
147
|
-
|
|
148
|
-
<div className="mt-6 text-center">
|
|
149
|
-
<p className="text-md">
|
|
150
|
-
{SCHEDULE_GRID_ONE.UI.COMPLIMENTARY_CLASS_TEXT}
|
|
151
|
-
<a href={"tel:".concat(SCHEDULE_GRID_ONE.UI.PHONE_NUMBER)} className="font-semibold">
|
|
152
|
-
{SCHEDULE_GRID_ONE.UI.PHONE_NUMBER}
|
|
153
|
-
</a>
|
|
154
|
-
.
|
|
155
|
-
</p>
|
|
156
|
-
<p className="mt-2 text-md italic">
|
|
157
|
-
{SCHEDULE_GRID_ONE.UI.SCHEDULE_DISCLAIMER}
|
|
158
|
-
</p>
|
|
159
|
-
</div>
|
|
160
|
-
|
|
161
|
-
<ClassPopup isOpen={isPopupOpen} onClose={function () {
|
|
162
|
-
setIsPopupOpen(false);
|
|
163
|
-
setSelectedClass(null);
|
|
164
|
-
}} classDetails={selectedClass}/>
|
|
165
|
-
</div>);
|
|
166
|
-
};
|
|
167
|
-
export default ScheduleGrid;
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
// src/pages/ScheduleGridTwo.tsx
|
|
2
|
-
"use client";
|
|
3
|
-
import React, { useState } from "react";
|
|
4
|
-
import { AddButton, DeleteIconButton } from "@/components/other/button";
|
|
5
|
-
import { ClassPopup } from "../ClassPopup";
|
|
6
|
-
import { SCHEDULE_GRID_TWO } from "./constants/ScheduleGridTwo";
|
|
7
|
-
import { useUser } from "@clerk/nextjs";
|
|
8
|
-
var ScheduleGrid = function (_a) {
|
|
9
|
-
var schedule = _a.schedule, isAdmin = _a.isAdmin, error = _a.error, openModal = _a.openModal, openConfirmDelete = _a.openConfirmDelete, formatTime = _a.formatTime;
|
|
10
|
-
var _b = useState(false), isPopupOpen = _b[0], setIsPopupOpen = _b[1];
|
|
11
|
-
var _c = useState(null), selectedClass = _c[0], setSelectedClass = _c[1];
|
|
12
|
-
var isSignedIn = useUser().isSignedIn;
|
|
13
|
-
var daysOfWeek = SCHEDULE_GRID_TWO.UI.DAYS_OF_WEEK;
|
|
14
|
-
var handleClassClick = function (cls, day) {
|
|
15
|
-
if (!isAdmin) {
|
|
16
|
-
setSelectedClass({
|
|
17
|
-
id: cls.documentId,
|
|
18
|
-
title: cls.name,
|
|
19
|
-
time: "".concat(formatTime(cls.startTime), " - ").concat(formatTime(cls.endTime)),
|
|
20
|
-
day: day,
|
|
21
|
-
ageGroup: SCHEDULE_GRID_TWO.UI.ALL_AGES_TEXT,
|
|
22
|
-
});
|
|
23
|
-
setIsPopupOpen(true);
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
openModal(cls, day);
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
return (<>
|
|
30
|
-
<style jsx>{"\n @import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap\");\n\n :root {\n --jubilee: #f47c7c;\n --natural-white: #f7f7f7;\n --caviar: #2d2d2d;\n --storm-cloud: #4a636e;\n --exuberant-blue: #c71585;\n --modern-purple: #d946ef;\n }\n\n * {\n font-family: \"Inter\", system-ui, sans-serif;\n box-sizing: border-box;\n }\n\n .schedule-container {\n background: rgba(255, 255, 255, 0.1);\n backdrop-filter: blur(12px);\n border: 1px solid rgba(255, 255, 255, 0.2);\n border-radius: 2rem;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);\n min-width: 0;\n }\n\n .day-header {\n background: linear-gradient(45deg, var(--exuberant-blue), var(--jubilee));\n color: white;\n border-radius: 0.5rem;\n padding: 0.5rem;\n font-size: 1.8rem;\n text-align: center;\n font-weight: bold;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);\n }\n\n .schedule-text {\n font-size: 2rem;\n text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000,\n 0 2px 4px rgba(0, 0, 0, 0.4);\n line-height: 1.4;\n padding-bottom: 0.5rem;\n }\n\n .schedule-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-left: auto;\n margin-right: auto;\n margin-bottom: 1.5rem;\n }\n\n .schedule-card {\n background: rgba(255, 255, 255, 0.12);\n backdrop-filter: blur(10px);\n hanging-punctuation: 1px solid rgba(255, 255, 255, 0.2);\n border-radius: 1rem;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);\n min-width: 0;\n }\n\n @media (max-width: 1024px) {\n .schedule-text {\n font-size: 1.25rem;\n }\n\n .schedule-container {\n padding: 1rem;\n }\n\n .schedule-card {\n padding: 0.75rem;\n }\n }\n\n @media (max-width: 640px) {\n .schedule-text {\n font-size: 1.125rem;\n }\n\n .schedule-container {\n padding: 0.5rem;\n }\n\n .schedule-card {\n padding: 0.5rem;\n border-radius: 0.75rem;\n }\n\n .day-header {\n padding: 0.4rem;\n font-size: 1rem;\n }\n\n .schedule-header {\n flex-direction: column;\n align-items: flex-start;\n margin-bottom: 1rem;\n }\n\n .schedule-header h2 {\n margin-bottom: 0.5rem;\n }\n }\n\n @media (max-width: 320px) {\n .schedule-text {\n font-size: 1rem;\n }\n }\n "}</style>
|
|
31
|
-
|
|
32
|
-
<div className="mb-16 pt-12">
|
|
33
|
-
<div className="schedule-header">
|
|
34
|
-
<h2 className="text-2xl sm:text-3xl lg:text-4xl text-white font-black tracking-wide drop-shadow-md section-heading" style={{
|
|
35
|
-
textShadow: "\n -1px -1px 0 #000,\n 1px -1px 0 #000,\n -1px 1px 0 #000,\n 1px 1px 0 #000,\n 0 2px 4px rgba(0, 0, 0, 0.4)\n ",
|
|
36
|
-
}}>
|
|
37
|
-
{SCHEDULE_GRID_TWO.UI.CLASS_SCHEDULE_HEADING}
|
|
38
|
-
</h2>
|
|
39
|
-
|
|
40
|
-
{isAdmin && (<AddButton onClick={function () { return openModal(); }} className="mt-4">
|
|
41
|
-
{SCHEDULE_GRID_TWO.BUTTONS.ADD_NEW_CLASS_BUTTON}
|
|
42
|
-
</AddButton>)}
|
|
43
|
-
</div>
|
|
44
|
-
{error ? (<div className="text-center text-red-400 text-xl sm:text-2xl font-bold content-text">{error}</div>) : (<div className="schedule-container rounded-[2rem] overflow-hidden p-6">
|
|
45
|
-
<div className="grid grid-cols-1 gap-4">
|
|
46
|
-
{daysOfWeek.map(function (day, index) {
|
|
47
|
-
var classes = schedule[day] || [];
|
|
48
|
-
return (<div key={day} className="p-4 flex flex-col min-w-0">
|
|
49
|
-
<h3 className="text-lg font-bold text-white mb-3 text-center day-header content-text" style={{
|
|
50
|
-
textShadow: "\n -1px -1px 0 #000,\n 1px -1px 0 #000,\n -1px 1px 0 #000,\n 1px 1px 0 #000,\n 0 2px 4px rgba(0, 0, 0, 0.4)\n ",
|
|
51
|
-
}}>
|
|
52
|
-
{day}
|
|
53
|
-
</h3>
|
|
54
|
-
|
|
55
|
-
<ul className="space-y-3 font-medium flex-1">
|
|
56
|
-
{classes.length > 0 ? (classes.map(function (cls) { return (<li key={"".concat(cls.startTime, "-").concat(cls.endTime, "-").concat(cls.id)} className={"schedule-card p-3 border-none relative ".concat(isAdmin ? "cursor-pointer hover:bg-blue-600/20" : "cursor-pointer hover:bg-blue-600/20")} onClick={function () { return handleClassClick(cls, day); }} role="button" tabIndex={0} onKeyDown={function (e) {
|
|
57
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
58
|
-
e.preventDefault();
|
|
59
|
-
handleClassClick(cls, day);
|
|
60
|
-
}
|
|
61
|
-
}}>
|
|
62
|
-
<div className="flex flex-col space-y-1">
|
|
63
|
-
<span className="font-semibold text-[#ff48bc] schedule-text">{cls.name}</span>
|
|
64
|
-
<div className="flex flex-col text-white schedule-text">
|
|
65
|
-
<span>
|
|
66
|
-
{formatTime(cls.startTime)} - {formatTime(cls.endTime)}
|
|
67
|
-
</span>
|
|
68
|
-
</div>
|
|
69
|
-
{isAdmin && (<DeleteIconButton onClick={function (e) {
|
|
70
|
-
e.stopPropagation();
|
|
71
|
-
openConfirmDelete(cls.id, cls.documentId, day);
|
|
72
|
-
}} aria-label={SCHEDULE_GRID_TWO.UI.DELETE_BUTTON_ARIA.replace("${cls.name}", cls.name)}/>)}
|
|
73
|
-
</div>
|
|
74
|
-
</li>); })) : (<li className="text-center text-white schedule-text">{SCHEDULE_GRID_TWO.UI.NO_CLASSES_MESSAGE}</li>)}
|
|
75
|
-
</ul>
|
|
76
|
-
</div>);
|
|
77
|
-
})}
|
|
78
|
-
</div>
|
|
79
|
-
</div>)}
|
|
80
|
-
<div className="mt-6 text-center">
|
|
81
|
-
<p className="text-md content-text">
|
|
82
|
-
{SCHEDULE_GRID_TWO.UI.COMPLIMENTARY_CLASS_TEXT}
|
|
83
|
-
<a href={"tel:".concat(SCHEDULE_GRID_TWO.UI.PHONE_NUMBER)} className="font-semibold">
|
|
84
|
-
{SCHEDULE_GRID_TWO.UI.PHONE_NUMBER}
|
|
85
|
-
</a>
|
|
86
|
-
.
|
|
87
|
-
</p>
|
|
88
|
-
<p className="mt-2 text-md italic content-text">
|
|
89
|
-
{SCHEDULE_GRID_TWO.UI.SCHEDULE_DISCLAIMER}
|
|
90
|
-
</p>
|
|
91
|
-
</div>
|
|
92
|
-
|
|
93
|
-
<ClassPopup isOpen={isPopupOpen} onClose={function () {
|
|
94
|
-
setIsPopupOpen(false);
|
|
95
|
-
setSelectedClass(null);
|
|
96
|
-
}} classDetails={selectedClass}/>
|
|
97
|
-
</div>
|
|
98
|
-
</>);
|
|
99
|
-
};
|
|
100
|
-
export default ScheduleGrid;
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
// src/pages/ScheduleGridTwoBasic.tsx
|
|
2
|
-
"use client";
|
|
3
|
-
import React, { useState } from "react";
|
|
4
|
-
import { AddButton, DeleteIconButton } from "@/components/other/button";
|
|
5
|
-
import { useUser } from "@clerk/nextjs";
|
|
6
|
-
import { SCHEDULE_GRID_TWO_BASIC } from "./constants/ScheduleGridTwoBasic";
|
|
7
|
-
var ScheduleGrid = function (_a) {
|
|
8
|
-
var schedule = _a.schedule, isAdmin = _a.isAdmin, error = _a.error, openModal = _a.openModal, openConfirmDelete = _a.openConfirmDelete, formatTime = _a.formatTime;
|
|
9
|
-
var _b = useState(false), isPopupOpen = _b[0], setIsPopupOpen = _b[1];
|
|
10
|
-
var _c = useState(null), selectedClass = _c[0], setSelectedClass = _c[1];
|
|
11
|
-
var isSignedIn = useUser().isSignedIn;
|
|
12
|
-
var daysOfWeek = SCHEDULE_GRID_TWO_BASIC.UI.DAYS_OF_WEEK;
|
|
13
|
-
var handleClassClick = function (cls, day) {
|
|
14
|
-
if (!isAdmin) {
|
|
15
|
-
setSelectedClass({
|
|
16
|
-
id: cls.documentId,
|
|
17
|
-
title: cls.name,
|
|
18
|
-
time: "".concat(formatTime(cls.startTime), " - ").concat(formatTime(cls.endTime)),
|
|
19
|
-
day: day,
|
|
20
|
-
ageGroup: SCHEDULE_GRID_TWO_BASIC.UI.ALL_AGES_TEXT,
|
|
21
|
-
});
|
|
22
|
-
setIsPopupOpen(true);
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
openModal(cls, day);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
return (<>
|
|
29
|
-
<style jsx>{"\n @import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap\");\n\n :root {\n --jubilee: #f47c7c;\n --natural-white: #f7f7f7;\n --caviar: #2d2d2d;\n --storm-cloud: #4a636e;\n --exuberant-blue: #c71585;\n --modern-purple: #d946ef;\n }\n\n * {\n font-family: \"Inter\", system-ui, sans-serif;\n box-sizing: border-box;\n }\n\n .schedule-container {\n background: rgba(255, 255, 255, 0.1);\n backdrop-filter: blur(12px);\n border: 1px solid rgba(255, 255, 255, 0.2);\n border-radius: 2rem;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);\n min-width: 0;\n }\n\n .day-header {\n background: linear-gradient(45deg, var(--exuberant-blue), var(--jubilee));\n color: white;\n border-radius: 0.5rem;\n padding: 0.5rem;\n font-size: 1.8rem;\n text-align: center;\n font-weight: bold;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);\n }\n\n .schedule-text {\n font-size: 2rem;\n text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000,\n 0 2px 4px rgba(0, 0, 0, 0.4);\n line-height: 1.4;\n padding-bottom: 0.5rem;\n }\n\n .schedule-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-left: auto;\n margin-right: auto;\n margin-bottom: 1.5rem;\n }\n\n .schedule-card {\n background: rgba(255, 255, 255, 0.12);\n backdrop-filter: blur(10px);\n hanging-punctuation: 1px solid rgba(255, 255, 255, 0.2);\n border-radius: 1rem;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);\n min-width: 0;\n }\n\n .schedule-card:hover {\n background: #f48fb1;\n }\n\n @media (max-width: 1024px) {\n .schedule-text {\n font-size: 1.25rem;\n }\n\n .schedule-container {\n padding: 1rem;\n }\n\n .schedule-card {\n padding: 0.75rem;\n }\n }\n\n @media (max-width: 640px) {\n .schedule-text {\n font-size: 1.125rem;\n }\n\n .schedule-container {\n padding: 0.5rem;\n }\n\n .schedule-card {\n padding: 0.5rem;\n border-radius: 0.75rem;\n }\n\n .day-header {\n padding: 0.4rem;\n font-size: 1rem;\n }\n\n .schedule-header {\n flex-direction: column;\n align-items: flex-start;\n margin-bottom: 1rem;\n }\n\n .schedule-header h2 {\n margin-bottom: 0.5rem;\n }\n }\n\n @media (max-width: 320px) {\n .schedule-text {\n font-size: 1rem;\n }\n }\n "}</style>
|
|
30
|
-
|
|
31
|
-
<div className="mb-16 pt-12">
|
|
32
|
-
<div className="schedule-header">
|
|
33
|
-
<h2 className="text-2xl sm:text-3xl lg:text-6xl text-white font-black tracking-wide drop-shadow-md section-heading" style={{
|
|
34
|
-
textShadow: "\n -1px -1px 0 #000,\n 1px -1px 0 #000,\n -1px 1px 0 #000,\n 1px 1px 0 #000,\n 0 2px 4px rgba(0, 0, 0, 0.4)\n ",
|
|
35
|
-
}}>
|
|
36
|
-
{SCHEDULE_GRID_TWO_BASIC.UI.CLASS_SCHEDULE_HEADING}
|
|
37
|
-
</h2>
|
|
38
|
-
|
|
39
|
-
{isAdmin && (<AddButton onClick={function () { return openModal(); }} className="mt-4">
|
|
40
|
-
{SCHEDULE_GRID_TWO_BASIC.BUTTONS.ADD_NEW_CLASS_BUTTON}
|
|
41
|
-
</AddButton>)}
|
|
42
|
-
</div>
|
|
43
|
-
{error ? (<div className="text-center text-red-400 text-xl sm:text-2xl font-bold content-text">{error}</div>) : (<div className="schedule-container rounded-[2rem] overflow-hidden p-6">
|
|
44
|
-
<div className="grid grid-cols-1 gap-4">
|
|
45
|
-
{daysOfWeek.map(function (day, index) {
|
|
46
|
-
var classes = schedule[day] || [];
|
|
47
|
-
return (<div key={day} className="p-4 flex flex-col min-w-0">
|
|
48
|
-
<h3 className="text-lg font-bold text-white mb-3 text-center day-header content-text" style={{
|
|
49
|
-
textShadow: "\n -1px -1px 0 #000,\n 1px -1px 0 #000,\n -1px 1px 0 #000,\n 1px 1px 0 #000,\n 0 2px 4px rgba(0, 0, 0, 0.4)\n ",
|
|
50
|
-
}}>
|
|
51
|
-
{day}
|
|
52
|
-
</h3>
|
|
53
|
-
|
|
54
|
-
<ul className="space-y-3 font-medium flex-1">
|
|
55
|
-
{classes.length > 0 ? (classes.map(function (cls) { return (<li key={"".concat(cls.startTime, "-").concat(cls.endTime, "-").concat(cls.id)} className={"schedule-card p-3 border-none relative ".concat(isAdmin ? "cursor-pointer hover:bg-blue-600/20" : "cursor-default")} onClick={function () {
|
|
56
|
-
if (isAdmin)
|
|
57
|
-
handleClassClick(cls, day);
|
|
58
|
-
}} role={isAdmin ? "button" : undefined} tabIndex={isAdmin ? 0 : -1} onKeyDown={function (e) {
|
|
59
|
-
if (isAdmin && (e.key === "Enter" || e.key === " ")) {
|
|
60
|
-
e.preventDefault();
|
|
61
|
-
handleClassClick(cls, day);
|
|
62
|
-
}
|
|
63
|
-
}}>
|
|
64
|
-
<div className="flex flex-col space-y-1">
|
|
65
|
-
<span className="font-semibold text-[#ff48bc] schedule-text">{cls.name}</span>
|
|
66
|
-
<div className="flex flex-col text-white schedule-text">
|
|
67
|
-
<span>
|
|
68
|
-
{formatTime(cls.startTime)} - {formatTime(cls.endTime)}
|
|
69
|
-
</span>
|
|
70
|
-
</div>
|
|
71
|
-
{isAdmin && (<DeleteIconButton onClick={function (e) {
|
|
72
|
-
e.stopPropagation();
|
|
73
|
-
openConfirmDelete(cls.id, cls.documentId, day);
|
|
74
|
-
}} aria-label={SCHEDULE_GRID_TWO_BASIC.UI.DELETE_BUTTON_ARIA.replace("${cls.name}", cls.name)}/>)}
|
|
75
|
-
</div>
|
|
76
|
-
</li>); })) : (<li className="text-center text-white schedule-text">{SCHEDULE_GRID_TWO_BASIC.UI.NO_CLASSES_MESSAGE}</li>)}
|
|
77
|
-
</ul>
|
|
78
|
-
</div>);
|
|
79
|
-
})}
|
|
80
|
-
</div>
|
|
81
|
-
</div>)}
|
|
82
|
-
<div className="mt-6 text-center">
|
|
83
|
-
<p className="text-md content-text">
|
|
84
|
-
{SCHEDULE_GRID_TWO_BASIC.UI.COMPLIMENTARY_CLASS_TEXT}
|
|
85
|
-
<a href={"tel:".concat(SCHEDULE_GRID_TWO_BASIC.UI.PHONE_NUMBER)} className="font-semibold">
|
|
86
|
-
{SCHEDULE_GRID_TWO_BASIC.UI.PHONE_NUMBER}
|
|
87
|
-
</a>
|
|
88
|
-
.
|
|
89
|
-
</p>
|
|
90
|
-
<p className="mt-2 text-md italic content-text">
|
|
91
|
-
{SCHEDULE_GRID_TWO_BASIC.UI.SCHEDULE_DISCLAIMER}
|
|
92
|
-
</p>
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
</>);
|
|
96
|
-
};
|
|
97
|
-
export default ScheduleGrid;
|
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
// src/pages/Schedule.tsx
|
|
2
|
-
"use client";
|
|
3
|
-
var __assign = (this && this.__assign) || function () {
|
|
4
|
-
__assign = Object.assign || function(t) {
|
|
5
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
|
-
s = arguments[i];
|
|
7
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
8
|
-
t[p] = s[p];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
return __assign.apply(this, arguments);
|
|
13
|
-
};
|
|
14
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
15
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
16
|
-
if (ar || !(i in from)) {
|
|
17
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
18
|
-
ar[i] = from[i];
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
22
|
-
};
|
|
23
|
-
import React from "react";
|
|
24
|
-
import { AddButton, CancelButton, DeleteButton, CloseButton } from "@/components/other/button";
|
|
25
|
-
import { motion } from "framer-motion";
|
|
26
|
-
import { X } from "lucide-react";
|
|
27
|
-
import { useAuth } from "@clerk/nextjs";
|
|
28
|
-
import { SCHEDULER_FORM } from "./constants/SchedulerForm";
|
|
29
|
-
export default function Schedule(_a) {
|
|
30
|
-
var isModalOpen = _a.isModalOpen, setIsModalOpen = _a.setIsModalOpen, isConfirmDeleteOpen = _a.isConfirmDeleteOpen, setIsConfirmDeleteOpen = _a.setIsConfirmDeleteOpen, classToDelete = _a.classToDelete, setClassToDelete = _a.setClassToDelete, isLoading = _a.isLoading, error = _a.error, formData = _a.formData, setFormData = _a.setFormData, isAdmin = _a.isAdmin, handleSubmit = _a.handleSubmit, handleConfirmDelete = _a.handleConfirmDelete, handleCancelDelete = _a.handleCancelDelete, roundToNearestFiveMinutes = _a.roundToNearestFiveMinutes, modalVariants = _a.modalVariants;
|
|
31
|
-
var getToken = useAuth().getToken;
|
|
32
|
-
return (<div>
|
|
33
|
-
<style jsx>{"\n .modal-form input,\n .modal-form select,\n .modal-form textarea {\n font-size: 0.875rem;\n padding: 0.5rem;\n border-radius: 0.375rem;\n background: #374151;\n color: #f3f4f6;\n border: 1px solid #4b5563;\n }\n\n .modal-form input:focus,\n .modal-form select:focus,\n .modal-form textarea:focus {\n outline: none;\n ring: 2px solid #3b82f6;\n }\n\n .modal-form button {\n padding: 0.5rem 1rem;\n font-size: 0.875rem;\n border-radius: 0.375rem;\n }\n\n .modal-form label {\n font-size: 0.875rem;\n color: #d1d5db;\n }\n\n @media (max-width: 640px) {\n .modal-form input,\n .modal-form select,\n .modal-form textarea {\n font-size: 0.875rem;\n padding: 0.5rem;\n border-radius: 0.375rem;\n }\n\n .modal-form button {\n padding: 0.5rem 1rem;\n font-size: 0.875rem;\n border-radius: 0.375rem;\n }\n\n .modal-form label {\n font-size: 0.875rem;\n }\n\n .modal-form .flex {\n flex-direction: column;\n gap: 0.5rem;\n }\n\n .modal-form select {\n appearance: none;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23A1A1AA'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position: right 0.75rem center;\n background-size: 1rem;\n }\n\n .modal-form input[type=\"checkbox\"] {\n height: 1.25rem;\n width: 1.25rem;\n }\n\n .modal-form textarea {\n min-height: 80px;\n }\n }\n\n @media (max-width: 320px) {\n .modal-form input,\n .modal-form select,\n .modal-form textarea {\n font-size: 0.75rem;\n padding: 0.5rem;\n }\n\n .modal-form button {\n padding: 0.5rem 0.75rem;\n font-size: 0.75rem;\n }\n\n .modal-form label {\n font-size: 0.75rem;\n }\n }\n "}</style>
|
|
34
|
-
|
|
35
|
-
{/* Modal for Add/Edit */}
|
|
36
|
-
{isModalOpen && isAdmin && (<motion.div variants={modalVariants} initial="hidden" animate="visible" exit="exit" className="fixed inset-0 bg-black/90 flex items-center justify-center z-[10000] p-4 isolate" onClick={function () { return setIsModalOpen(false); }}>
|
|
37
|
-
<div className="relative max-w-5xl w-full mx-4 p-6 bg-gray-800/50 border border-gray-700/50 rounded-lg shadow-lg max-h-[90vh] overflow-y-auto" onClick={function (e) { return e.stopPropagation(); }}>
|
|
38
|
-
<CloseButton onClick={function () { return setIsModalOpen(false); }}>
|
|
39
|
-
<X className="h-6 w-6 sm:h-8 sm:w-8"/>
|
|
40
|
-
</CloseButton>
|
|
41
|
-
<h3 className="text-xl font-bold text-white mb-4">
|
|
42
|
-
{formData.id ? SCHEDULER_FORM.UI.EDIT_CLASS_HEADING : SCHEDULER_FORM.UI.ADD_NEW_CLASS_HEADING}
|
|
43
|
-
</h3>
|
|
44
|
-
<form onSubmit={handleSubmit} className="space-y-4 modal-form">
|
|
45
|
-
<div>
|
|
46
|
-
<label htmlFor="className" className="block text-sm font-medium text-gray-300 mb-1">
|
|
47
|
-
{SCHEDULER_FORM.UI.CLASS_NAME_LABEL}
|
|
48
|
-
</label>
|
|
49
|
-
<input id="className" type="text" placeholder={SCHEDULER_FORM.UI.CLASS_NAME_PLACEHOLDER} value={formData.name} onChange={function (e) { return setFormData(__assign(__assign({}, formData), { name: e.target.value })); }} className="w-full p-2 rounded bg-gray-700 text-white border border-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm" required/>
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
<div>
|
|
53
|
-
<label className="block text-sm font-medium text-gray-300 mb-1">{SCHEDULER_FORM.UI.START_TIME_LABEL}</label>
|
|
54
|
-
<div className="flex flex-col sm:flex-row sm:space-x-2 space-y-2 sm:space-y-0">
|
|
55
|
-
<select value={formData.startTime ? formData.startTime.split(":")[0] : ""} onChange={function (e) {
|
|
56
|
-
var hours = e.target.value;
|
|
57
|
-
var minutes = formData.startTime ? formData.startTime.split(":")[1] : "00";
|
|
58
|
-
var newTime = roundToNearestFiveMinutes("".concat(hours, ":").concat(minutes));
|
|
59
|
-
setFormData(__assign(__assign({}, formData), { startTime: newTime }));
|
|
60
|
-
}} className="w-full sm:w-1/3 p-2 rounded bg-gray-700 text-white border border-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm" required>
|
|
61
|
-
<option value="" disabled>{SCHEDULER_FORM.UI.HOUR_OPTION}</option>
|
|
62
|
-
{Array.from({ length: 12 }, function (_, i) { return i + 1; }).map(function (hour) { return (<option key={hour} value={String(hour).padStart(2, "0")}>{hour}</option>); })}
|
|
63
|
-
</select>
|
|
64
|
-
<select value={formData.startTime ? formData.startTime.split(":")[1] : ""} onChange={function (e) {
|
|
65
|
-
var minutes = e.target.value;
|
|
66
|
-
var hours = formData.startTime ? formData.startTime.split(":")[0] : "12";
|
|
67
|
-
var newTime = roundToNearestFiveMinutes("".concat(hours, ":").concat(minutes));
|
|
68
|
-
setFormData(__assign(__assign({}, formData), { startTime: newTime }));
|
|
69
|
-
}} className="w-full sm:w-1/3 p-2 rounded bg-gray-700 text-white border border-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm" required>
|
|
70
|
-
<option value="" disabled>{SCHEDULER_FORM.UI.MINUTE_OPTION}</option>
|
|
71
|
-
{["00", "05", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55"].map(function (minute) { return (<option key={minute} value={minute}>{minute}</option>); })}
|
|
72
|
-
</select>
|
|
73
|
-
<select value={formData.startTime && Number(formData.startTime.split(":")[0]) >= 12 ? SCHEDULER_FORM.UI.PM_OPTION : SCHEDULER_FORM.UI.AM_OPTION} onChange={function (e) {
|
|
74
|
-
var period = e.target.value;
|
|
75
|
-
var hours = formData.startTime ? Number(formData.startTime.split(":")[0]) : 12;
|
|
76
|
-
var minutes = formData.startTime ? formData.startTime.split(":")[1] : "00";
|
|
77
|
-
if (period === SCHEDULER_FORM.UI.AM_OPTION && hours >= 12)
|
|
78
|
-
hours -= 12;
|
|
79
|
-
else if (period === SCHEDULER_FORM.UI.PM_OPTION && hours < 12)
|
|
80
|
-
hours += 12;
|
|
81
|
-
var newTime = roundToNearestFiveMinutes("".concat(String(hours).padStart(2, "0"), ":").concat(minutes));
|
|
82
|
-
setFormData(__assign(__assign({}, formData), { startTime: newTime }));
|
|
83
|
-
}} className="w-full sm:w-1/3 p-2 rounded bg-gray-700 text-white border border-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm" required>
|
|
84
|
-
<option value={SCHEDULER_FORM.UI.AM_OPTION}>{SCHEDULER_FORM.UI.AM_OPTION}</option>
|
|
85
|
-
<option value={SCHEDULER_FORM.UI.PM_OPTION}>{SCHEDULER_FORM.UI.PM_OPTION}</option>
|
|
86
|
-
</select>
|
|
87
|
-
</div>
|
|
88
|
-
</div>
|
|
89
|
-
|
|
90
|
-
<div>
|
|
91
|
-
<label className="block text-sm font-medium text-gray-300 mb-1">{SCHEDULER_FORM.UI.END_TIME_LABEL}</label>
|
|
92
|
-
<div className="flex flex-col sm:flex-row sm:space-x-2 space-y-2 sm:space-y-0">
|
|
93
|
-
<select value={formData.endTime ? formData.endTime.split(":")[0] : ""} onChange={function (e) {
|
|
94
|
-
var hours = e.target.value;
|
|
95
|
-
var minutes = formData.endTime ? formData.endTime.split(":")[1] : "00";
|
|
96
|
-
var newTime = roundToNearestFiveMinutes("".concat(hours, ":").concat(minutes));
|
|
97
|
-
setFormData(__assign(__assign({}, formData), { endTime: newTime }));
|
|
98
|
-
}} className="w-full sm:w-1/3 p-2 rounded bg-gray-700 text-white border border-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm" required>
|
|
99
|
-
<option value="" disabled>{SCHEDULER_FORM.UI.HOUR_OPTION}</option>
|
|
100
|
-
{Array.from({ length: 12 }, function (_, i) { return i + 1; }).map(function (hour) { return (<option key={hour} value={String(hour).padStart(2, "0")}>{hour}</option>); })}
|
|
101
|
-
</select>
|
|
102
|
-
<select value={formData.endTime ? formData.endTime.split(":")[1] : ""} onChange={function (e) {
|
|
103
|
-
var minutes = e.target.value;
|
|
104
|
-
var hours = formData.endTime ? formData.endTime.split(":")[0] : "12";
|
|
105
|
-
var newTime = roundToNearestFiveMinutes("".concat(hours, ":").concat(minutes));
|
|
106
|
-
setFormData(__assign(__assign({}, formData), { endTime: newTime }));
|
|
107
|
-
}} className="w-full sm:w-1/3 p-2 rounded bg-gray-700 text-white border border-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm" required>
|
|
108
|
-
<option value="" disabled>{SCHEDULER_FORM.UI.MINUTE_OPTION}</option>
|
|
109
|
-
{["00", "05", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55"].map(function (minute) { return (<option key={minute} value={minute}>{minute}</option>); })}
|
|
110
|
-
</select>
|
|
111
|
-
<select value={formData.endTime && Number(formData.endTime.split(":")[0]) >= 12 ? SCHEDULER_FORM.UI.PM_OPTION : SCHEDULER_FORM.UI.AM_OPTION} onChange={function (e) {
|
|
112
|
-
var period = e.target.value;
|
|
113
|
-
var hours = formData.endTime ? Number(formData.endTime.split(":")[0]) : 12;
|
|
114
|
-
var minutes = formData.endTime ? formData.endTime.split(":")[1] : "00";
|
|
115
|
-
if (period === SCHEDULER_FORM.UI.AM_OPTION && hours >= 12)
|
|
116
|
-
hours -= 12;
|
|
117
|
-
else if (period === SCHEDULER_FORM.UI.PM_OPTION && hours < 12)
|
|
118
|
-
hours += 12;
|
|
119
|
-
var newTime = roundToNearestFiveMinutes("".concat(String(hours).padStart(2, "0"), ":").concat(minutes));
|
|
120
|
-
setFormData(__assign(__assign({}, formData), { endTime: newTime }));
|
|
121
|
-
}} className="w-full sm:w-1/3 p-2 rounded bg-gray-700 text-white border border-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm" required>
|
|
122
|
-
<option value={SCHEDULER_FORM.UI.AM_OPTION}>{SCHEDULER_FORM.UI.AM_OPTION}</option>
|
|
123
|
-
<option value={SCHEDULER_FORM.UI.PM_OPTION}>{SCHEDULER_FORM.UI.PM_OPTION}</option>
|
|
124
|
-
</select>
|
|
125
|
-
</div>
|
|
126
|
-
</div>
|
|
127
|
-
|
|
128
|
-
<div>
|
|
129
|
-
<label className="block text-sm font-medium text-gray-300 mb-1">{SCHEDULER_FORM.UI.DAYS_OF_WEEK_LABEL}</label>
|
|
130
|
-
<div className="grid grid-cols-2 sm:grid-cols-4 gap-2">
|
|
131
|
-
{SCHEDULER_FORM.UI.DAYS_OF_WEEK.map(function (day) { return (<label key={day.value} className="flex items-center space-x-2 cursor-pointer">
|
|
132
|
-
<input type="checkbox" value={day.value} checked={formData.daysOfWeek.includes(day.value)} onChange={function (e) {
|
|
133
|
-
var value = Number(e.target.value);
|
|
134
|
-
setFormData(__assign(__assign({}, formData), { daysOfWeek: e.target.checked
|
|
135
|
-
? __spreadArray(__spreadArray([], formData.daysOfWeek, true), [value], false).sort()
|
|
136
|
-
: formData.daysOfWeek.filter(function (d) { return d !== value; }) }));
|
|
137
|
-
}} className="h-5 w-5 text-blue-500 focus:ring-blue-500 border-gray-600 rounded bg-gray-700"/>
|
|
138
|
-
<span className="text-gray-300 text-sm">{day.label}</span>
|
|
139
|
-
</label>); })}
|
|
140
|
-
</div>
|
|
141
|
-
</div>
|
|
142
|
-
|
|
143
|
-
<div>
|
|
144
|
-
<label htmlFor="classDescription" className="block text-sm font-medium text-gray-300 mb-1">
|
|
145
|
-
{SCHEDULER_FORM.UI.CLASS_DESCRIPTION_LABEL}
|
|
146
|
-
</label>
|
|
147
|
-
<textarea id="classDescription" placeholder={SCHEDULER_FORM.UI.CLASS_DESCRIPTION_PLACEHOLDER} value={formData.classDescription} onChange={function (e) { return setFormData(__assign(__assign({}, formData), { classDescription: e.target.value })); }} className="w-full p-2 rounded bg-gray-700 text-white border border-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm min-h-[80px]"/>
|
|
148
|
-
</div>
|
|
149
|
-
|
|
150
|
-
<div className="flex space-x-3">
|
|
151
|
-
<div className="flex flex-col sm:flex-row space-y-2 sm:space-y-0 sm:space-x-3">
|
|
152
|
-
<AddButton type="submit" disabled={isLoading}>
|
|
153
|
-
{isLoading
|
|
154
|
-
? SCHEDULER_FORM.BUTTONS.SAVING_BUTTON
|
|
155
|
-
: formData.id
|
|
156
|
-
? SCHEDULER_FORM.BUTTONS.UPDATE_BUTTON
|
|
157
|
-
: SCHEDULER_FORM.BUTTONS.ADD_BUTTON}
|
|
158
|
-
</AddButton>
|
|
159
|
-
<CancelButton type="button" onClick={function () { return setIsModalOpen(false); }}>
|
|
160
|
-
{SCHEDULER_FORM.BUTTONS.CANCEL_BUTTON}
|
|
161
|
-
</CancelButton>
|
|
162
|
-
</div>
|
|
163
|
-
</div>
|
|
164
|
-
{error && <p className="text-red-400 text-sm font-medium">{error}</p>}
|
|
165
|
-
</form>
|
|
166
|
-
</div>
|
|
167
|
-
</motion.div>)}
|
|
168
|
-
|
|
169
|
-
{/* Confirmation Popup for Delete */}
|
|
170
|
-
{isConfirmDeleteOpen && isAdmin && (<motion.div variants={modalVariants} initial="hidden" animate="visible" exit="exit" className="fixed inset-0 bg-black/90 flex items-center justify-center z-[10000] p-4 isolate" onClick={handleCancelDelete}>
|
|
171
|
-
<div className="relative max-w-5xl w-full mx-4 p-6 bg-gray-800/50 border border-gray-700/50 rounded-lg shadow-lg" onClick={function (e) { return e.stopPropagation(); }}>
|
|
172
|
-
<CloseButton onClick={handleCancelDelete}>
|
|
173
|
-
<X className="h-6 w-6 sm:h-8 sm:w-8"/>
|
|
174
|
-
</CloseButton>
|
|
175
|
-
<h3 className="text-xl font-bold text-white mb-4">{SCHEDULER_FORM.UI.DELETE_CONFIRMATION_HEADING}</h3>
|
|
176
|
-
<p className="text-gray-300 text-sm mb-4">{SCHEDULER_FORM.UI.DELETE_CONFIRMATION_MESSAGE}</p>
|
|
177
|
-
<div className="flex space-x-3">
|
|
178
|
-
<DeleteButton onClick={handleConfirmDelete} disabled={isLoading}>
|
|
179
|
-
{isLoading ? SCHEDULER_FORM.BUTTONS.DELETING_BUTTON : SCHEDULER_FORM.BUTTONS.DELETE_BUTTON}
|
|
180
|
-
</DeleteButton>
|
|
181
|
-
<CancelButton onClick={handleCancelDelete}>
|
|
182
|
-
{SCHEDULER_FORM.BUTTONS.CANCEL_BUTTON}
|
|
183
|
-
</CancelButton>
|
|
184
|
-
</div>
|
|
185
|
-
</div>
|
|
186
|
-
</motion.div>)}
|
|
187
|
-
</div>);
|
|
188
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
// components/addOns/functional/schedules/constants/scheduleGridTwo.ts
|
|
2
|
-
// Constants for hardcoded text in ScheduleGridTwo.tsx, organized by purpose
|
|
3
|
-
export var SCHEDULE_GRID_TWO = {
|
|
4
|
-
// UI Text for ScheduleGridTwo
|
|
5
|
-
UI: {
|
|
6
|
-
// Heading for schedule section
|
|
7
|
-
CLASS_SCHEDULE_HEADING: "Class Schedule",
|
|
8
|
-
// Text when no classes exist for a day
|
|
9
|
-
NO_CLASSES_MESSAGE: "No classes",
|
|
10
|
-
// Footer text before phone number
|
|
11
|
-
COMPLIMENTARY_CLASS_TEXT: "Your first class is complimentary! Questions? Call ",
|
|
12
|
-
// Phone number in footer link
|
|
13
|
-
PHONE_NUMBER: "315-415-4043",
|
|
14
|
-
// Footer disclaimer
|
|
15
|
-
SCHEDULE_DISCLAIMER: "*Management reserves the right to cancel or alter class schedules based on attendance.",
|
|
16
|
-
// Days of the week for headers
|
|
17
|
-
DAYS_OF_WEEK: [
|
|
18
|
-
"Monday",
|
|
19
|
-
"Tuesday",
|
|
20
|
-
"Wednesday",
|
|
21
|
-
"Thursday",
|
|
22
|
-
"Friday",
|
|
23
|
-
"Saturday",
|
|
24
|
-
"Sunday",
|
|
25
|
-
],
|
|
26
|
-
// Hardcoded age group for popup
|
|
27
|
-
ALL_AGES_TEXT: "All Ages",
|
|
28
|
-
// DeleteIconButton aria-label template
|
|
29
|
-
DELETE_BUTTON_ARIA: "Delete ${cls.name} class",
|
|
30
|
-
},
|
|
31
|
-
// Button Text for ScheduleGridTwo
|
|
32
|
-
BUTTONS: {
|
|
33
|
-
// AddButton text for adding new class
|
|
34
|
-
ADD_NEW_CLASS_BUTTON: "Add New Class",
|
|
35
|
-
},
|
|
36
|
-
// Error Messages for ScheduleGridTwo
|
|
37
|
-
ERRORS: {
|
|
38
|
-
// No hardcoded errors
|
|
39
|
-
},
|
|
40
|
-
};
|