@licklist/design 0.78.5-dev.93 → 0.78.5-dev.95
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/.claude/settings.local.json +19 -0
- package/dist/Maintenance/Maintenance.scss.js +1 -1
- package/dist/events/event-venue-map/components/Dropdown/components/DropdownWrapper/DropdownWrapper.d.ts.map +1 -1
- package/dist/events/event-venue-map/components/Dropdown/components/DropdownWrapper/index.d.ts.map +1 -1
- package/dist/events/event-venue-map/components/Dropdown/components/ProductsControl/ProductsControl.d.ts.map +1 -1
- package/dist/events/event-venue-map/components/Dropdown/components/ProductsControl/index.d.ts.map +1 -1
- package/dist/events/event-venue-map/components/Dropdown/components/SelectControl/SelectControl.d.ts.map +1 -1
- package/dist/events/event-venue-map/components/Dropdown/components/SelectControl/index.d.ts.map +1 -1
- package/dist/events/event-venue-map/components/MapPoint/components/DeleteIcon/DeleteIcon.d.ts.map +1 -1
- package/dist/events/event-venue-map/components/MapPoint/components/DeleteIcon/index.d.ts.map +1 -1
- package/dist/events/event-venue-map/components/MapPoint/components/EditIcon/EditIcon.d.ts.map +1 -1
- package/dist/events/event-venue-map/components/MapPoint/components/EditIcon/index.d.ts.map +1 -1
- package/dist/events/event-venue-map/components/MapPoint/components/PointIcon/PointIcon.d.ts.map +1 -1
- package/dist/events/event-venue-map/components/MapPoint/components/PointIcon/index.d.ts.map +1 -1
- package/dist/events/event-venue-map/components/MapPoint/components/ProductIcon/ProductIcon.d.ts.map +1 -1
- package/dist/events/event-venue-map/components/MapPoint/components/ProductIcon/index.d.ts.map +1 -1
- package/dist/events/event-venue-map/components/MapPoint/components/ProductTooltip/ProductTooltip.d.ts.map +1 -1
- package/dist/events/event-venue-map/components/MapPoint/components/ProductTooltip/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ProductSummary/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ProductsByMenuStep/ProductsByMenuStep.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ProductsByMenuStep/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/SummaryTotal.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductWithModifier/ProductWithModifier.d.ts.map +1 -1
- package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.d.ts.map +1 -1
- package/dist/iframe/page/components/PageBody/components/LeftBlock/index.d.ts.map +1 -1
- package/dist/iframe/page/components/PageBody/components/RightBlock/RightBlock.d.ts.map +1 -1
- package/dist/iframe/page/components/PageBody/components/RightBlock/index.d.ts.map +1 -1
- package/dist/v2/components/ActionMenu/ActionMenu.scss.js +1 -1
- package/dist/v2/components/AvatarUpload/AvatarUpload.d.ts.map +1 -1
- package/dist/v2/components/AvatarUpload/AvatarUpload.js +7 -3
- package/dist/v2/components/Badge/Badge.scss.js +1 -1
- package/dist/v2/components/Button/Button.scss.js +1 -1
- package/dist/v2/components/Button/GhostButton.scss.js +1 -1
- package/dist/v2/components/Checkbox/Checkbox.scss.js +1 -1
- package/dist/v2/components/IconButton/IconButton.scss.js +1 -1
- package/dist/v2/components/Modal/DeleteModal.d.ts.map +1 -1
- package/dist/v2/components/Modal/DeleteModal.js +10 -4
- package/dist/v2/components/Modal/DeleteModal.scss.js +1 -1
- package/dist/v2/components/NPSScore/NPSScore.scss.js +1 -1
- package/dist/v2/components/NewTabs/NewTabs.scss.js +1 -1
- package/dist/v2/components/Select/Select.scss.js +1 -1
- package/dist/v2/components/StatusBadge/StatusBadge.d.ts.map +1 -1
- package/dist/v2/components/StatusBadge/StatusBadge.js +17 -13
- package/dist/v2/components/StatusBadge/StatusBadge.scss.js +1 -1
- package/dist/v2/components/StepIndicator/StepIndicator.scss.js +1 -1
- package/dist/v2/components/TableControls/TableControls.d.ts.map +1 -1
- package/dist/v2/components/TableControls/TableControls.js +7 -3
- package/dist/v2/components/Tabs/Tabs.scss.js +1 -1
- package/dist/v2/components/Tooltip/Tooltip.scss.js +1 -1
- package/dist/v2/components/UserAvatar/UserAvatar.scss.js +1 -1
- package/dist/v2/components/UserPanel/UserPanel.d.ts.map +1 -1
- package/dist/v2/components/UserPanel/UserPanel.js +18 -14
- package/dist/v2/components/UserPanel/UserPanel.scss.js +1 -1
- package/dist/v2/components/WYSIWYGEditor/WYSIWYGEditor.scss.js +1 -1
- package/dist/v2/components/ZoneCard/ZoneCard.scss.js +1 -1
- package/dist/v2/dashboard-analytics/blog-posts/Blog.d.ts.map +1 -1
- package/dist/v2/dashboard-analytics/blog-posts/Blog.js +6 -2
- package/dist/v2/dashboard-analytics/chart/Chart.scss.js +1 -1
- package/dist/v2/dashboard-analytics/dashboard/Dashboard.d.ts.map +1 -1
- package/dist/v2/dashboard-analytics/dashboard/Dashboard.js +24 -16
- package/dist/v2/dashboard-analytics/metric-card/MetricCard.scss.js +1 -1
- package/dist/v2/dashboard-analytics/venue-card/VenueCard.scss.js +1 -1
- package/dist/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.scss.js +1 -1
- package/dist/v2/icons/index.d.ts +4 -0
- package/dist/v2/icons/index.d.ts.map +1 -1
- package/dist/v2/navigation/DashboardLayout/AdminSidebar.scss.js +1 -1
- package/dist/v2/navigation/DashboardLayout/DashboardFooter.d.ts.map +1 -1
- package/dist/v2/navigation/DashboardLayout/DashboardFooter.js +9 -6
- package/dist/v2/navigation/DashboardLayout/DashboardLayout.scss.js +1 -1
- package/dist/v2/navigation/DashboardLayout/ProviderSidebar.scss.js +1 -1
- package/dist/v2/navigation/DashboardLayout/TopNavigation.scss.js +1 -1
- package/dist/v2/navigation/SidebarUserElement/SidebarUserElement.d.ts.map +1 -1
- package/dist/v2/pages/RoleSelection/RoleSelectionPage.d.ts.map +1 -1
- package/dist/v2/pages/Settings/SettingsTabs.scss.js +1 -1
- package/dist/v2/pages/Settings/components/SidebarCustomisation.js +1 -0
- package/dist/v2/pages/Settings/components/SidebarCustomisation.scss.js +1 -1
- package/dist/v2/pages/Settings/components/SidebarNavItem.js +1 -0
- package/dist/v2/pages/UserDetails/UserDetailsPage.d.ts.map +1 -1
- package/dist/v2/pages/auth/AuthLayout/AuthLayout.d.ts.map +1 -1
- package/dist/v2/pages/auth/AuthLayout/AuthLayout.js +6 -2
- package/dist/v2/pages/auth/AuthLayout/AuthLayout.scss.js +1 -1
- package/dist/v2/shadcn/_reference/auth/CreatePasswordPanel.d.ts.map +1 -1
- package/dist/v2/shadcn/_reference/auth/LoginForm.d.ts.map +1 -1
- package/dist/v2/shadcn/_reference/auth/LoginPanel.d.ts.map +1 -1
- package/dist/v2/shadcn/_reference/auth/ResetPasswordForm.d.ts.map +1 -1
- package/dist/v2/shadcn/_reference/auth/ResetPasswordPanel.d.ts.map +1 -1
- package/dist/v2/shadcn/_reference/auth/VerifyEmailForm.d.ts.map +1 -1
- package/dist/v2/shadcn/_reference/auth/VerifyEmailPanel.d.ts.map +1 -1
- package/dist/v2/shadcn/_reference/email/EmailAttachment.d.ts.map +1 -1
- package/dist/v2/shadcn/_reference/shared/ConfirmationDialog.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/accordion.d.ts +4 -5
- package/dist/v2/shadcn/components/ui/accordion.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/alert-dialog.d.ts +9 -10
- package/dist/v2/shadcn/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/alert.d.ts +1 -4
- package/dist/v2/shadcn/components/ui/alert.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/aspect-ratio.d.ts +1 -2
- package/dist/v2/shadcn/components/ui/aspect-ratio.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/avatar.d.ts +3 -4
- package/dist/v2/shadcn/components/ui/avatar.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/badge.d.ts +1 -3
- package/dist/v2/shadcn/components/ui/badge.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/button.d.ts +1 -5
- package/dist/v2/shadcn/components/ui/button.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/checkbox.d.ts +1 -2
- package/dist/v2/shadcn/components/ui/checkbox.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/collapsible.d.ts +3 -4
- package/dist/v2/shadcn/components/ui/collapsible.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/command.d.ts +7 -72
- package/dist/v2/shadcn/components/ui/command.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/context-menu.d.ts +14 -21
- package/dist/v2/shadcn/components/ui/context-menu.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/dialog.d.ts +8 -9
- package/dist/v2/shadcn/components/ui/dialog.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/drawer.d.ts +7 -7
- package/dist/v2/shadcn/components/ui/drawer.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/dropdown-menu.d.ts +14 -21
- package/dist/v2/shadcn/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/form.d.ts +1 -2
- package/dist/v2/shadcn/components/ui/form.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/hover-card.d.ts +3 -4
- package/dist/v2/shadcn/components/ui/hover-card.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/input-otp.d.ts +1 -27
- package/dist/v2/shadcn/components/ui/input-otp.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/label.d.ts +1 -3
- package/dist/v2/shadcn/components/ui/label.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/menubar.d.ts +15 -27
- package/dist/v2/shadcn/components/ui/menubar.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/navigation-menu.d.ts +9 -10
- package/dist/v2/shadcn/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/popover.d.ts +3 -4
- package/dist/v2/shadcn/components/ui/popover.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/progress.d.ts +1 -2
- package/dist/v2/shadcn/components/ui/progress.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/radio-group.d.ts +2 -3
- package/dist/v2/shadcn/components/ui/radio-group.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/select.d.ts +10 -11
- package/dist/v2/shadcn/components/ui/select.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/separator.d.ts +1 -2
- package/dist/v2/shadcn/components/ui/separator.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/sheet.d.ts +9 -11
- package/dist/v2/shadcn/components/ui/sheet.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/sidebar.d.ts +2 -11
- package/dist/v2/shadcn/components/ui/sidebar.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/slider.d.ts +1 -2
- package/dist/v2/shadcn/components/ui/slider.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/switch.d.ts +1 -2
- package/dist/v2/shadcn/components/ui/switch.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/switch.scss.js +1 -1
- package/dist/v2/shadcn/components/ui/tabs.d.ts +4 -5
- package/dist/v2/shadcn/components/ui/tabs.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/toast.d.ts +7 -11
- package/dist/v2/shadcn/components/ui/toast.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/toggle-group.d.ts +2 -10
- package/dist/v2/shadcn/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/v2/shadcn/components/ui/toggle.d.ts +2 -10
- package/dist/v2/shadcn/components/ui/toggle.d.ts.map +1 -1
- package/dist/v2/styles/form/NewInput.scss.js +1 -1
- package/dist/zone/form/ZoneForm.js +2 -1
- package/dist/zone/form/components/ZoneControl.d.ts.map +1 -1
- package/dist/zone/form/components/ZoneControl.js +53 -1
- package/package.json +2 -2
- package/src/v2/components/AvatarUpload/AvatarUpload.tsx +5 -3
- package/src/v2/components/Customer/CustomersList.scss +8 -9
- package/src/v2/components/IconButton/IconButton.scss +9 -9
- package/src/v2/components/Modal/DeleteModal.tsx +5 -3
- package/src/v2/components/StatusBadge/StatusBadge.tsx +23 -18
- package/src/v2/components/TableControls/TableControls.tsx +5 -3
- package/src/v2/components/UserPanel/UserPanel.tsx +9 -5
- package/src/v2/dashboard-analytics/blog-posts/Blog.tsx +6 -4
- package/src/v2/dashboard-analytics/chart/Chart.scss +2 -2
- package/src/v2/dashboard-analytics/dashboard/Dashboard.tsx +19 -16
- package/src/v2/icons/index.tsx +15 -0
- package/src/v2/navigation/DashboardLayout/DashboardFooter.tsx +4 -2
- package/src/v2/navigation/SidebarUserElement/SidebarUserElement.tsx +5 -3
- package/src/v2/pages/RoleSelection/RoleSelectionPage.tsx +10 -8
- package/src/v2/pages/UserDetails/UserDetailsPage.tsx +16 -14
- package/src/v2/pages/auth/AuthLayout/AuthLayout.tsx +4 -2
- package/src/v2/shadcn/_reference/auth/CreatePasswordForm.tsx +9 -9
- package/src/v2/shadcn/_reference/auth/CreatePasswordPanel.tsx +5 -3
- package/src/v2/shadcn/_reference/auth/LoginForm.tsx +21 -17
- package/src/v2/shadcn/_reference/auth/LoginPanel.tsx +6 -4
- package/src/v2/shadcn/_reference/auth/ResetPasswordForm.tsx +14 -12
- package/src/v2/shadcn/_reference/auth/ResetPasswordPanel.tsx +5 -3
- package/src/v2/shadcn/_reference/auth/VerifyEmailForm.tsx +8 -6
- package/src/v2/shadcn/_reference/auth/VerifyEmailPanel.tsx +5 -3
- package/src/v2/shadcn/_reference/email/EmailAttachment.tsx +5 -3
- package/src/v2/shadcn/_reference/shared/ConfirmationDialog.tsx +13 -11
- package/src/zone/form/ZoneForm.tsx +1 -1
- package/src/zone/form/components/ZoneControl.tsx +22 -3
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
2
3
|
import { Button } from '../ui/button';
|
|
3
4
|
import { Label } from '../ui/label';
|
|
4
5
|
import { Input } from '../ui/input';
|
|
@@ -11,12 +12,13 @@ export const ResetPasswordForm: React.FC = () => {
|
|
|
11
12
|
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
12
13
|
const navigate = useNavigate();
|
|
13
14
|
const { showSuccess, showError } = useNotify();
|
|
15
|
+
const { t } = useTranslation(['User']);
|
|
14
16
|
|
|
15
17
|
const onSubmit = async (e: React.FormEvent) => {
|
|
16
18
|
e.preventDefault();
|
|
17
19
|
|
|
18
20
|
if (!email) {
|
|
19
|
-
showError('
|
|
21
|
+
showError(t('pleaseEnterEmailAddress'));
|
|
20
22
|
return;
|
|
21
23
|
}
|
|
22
24
|
|
|
@@ -27,14 +29,14 @@ export const ResetPasswordForm: React.FC = () => {
|
|
|
27
29
|
});
|
|
28
30
|
|
|
29
31
|
if (error) {
|
|
30
|
-
showError('
|
|
32
|
+
showError(t('resetFailed'), error.message);
|
|
31
33
|
return;
|
|
32
34
|
}
|
|
33
35
|
|
|
34
|
-
showSuccess('
|
|
36
|
+
showSuccess(t('passwordResetEmailSent'), t('checkYourInbox'));
|
|
35
37
|
navigate('/auth/verify-email');
|
|
36
38
|
} catch (error) {
|
|
37
|
-
showError('
|
|
39
|
+
showError(t('unexpectedError'));
|
|
38
40
|
} finally {
|
|
39
41
|
setIsSubmitting(false);
|
|
40
42
|
}
|
|
@@ -45,13 +47,13 @@ export const ResetPasswordForm: React.FC = () => {
|
|
|
45
47
|
{/* Info text */}
|
|
46
48
|
<div className="mb-6">
|
|
47
49
|
<p className="text-label-primary text-base leading-[1.4]">
|
|
48
|
-
|
|
50
|
+
{t('resetPasswordDescription')}
|
|
49
51
|
</p>
|
|
50
52
|
</div>
|
|
51
53
|
|
|
52
54
|
<div className="mb-6">
|
|
53
55
|
<Label htmlFor="email" className="text-label-primary text-[15px] font-semibold leading-[1.4] mb-2 block">
|
|
54
|
-
|
|
56
|
+
{t('emailAddress')}
|
|
55
57
|
</Label>
|
|
56
58
|
<Input
|
|
57
59
|
id="email"
|
|
@@ -70,28 +72,28 @@ export const ResetPasswordForm: React.FC = () => {
|
|
|
70
72
|
size="lg"
|
|
71
73
|
className="mb-4 min-w-[150px] w-fit"
|
|
72
74
|
>
|
|
73
|
-
{isSubmitting ? '
|
|
75
|
+
{isSubmitting ? t('sendingReset') : t('resetPassword')}
|
|
74
76
|
</Button>
|
|
75
77
|
|
|
76
78
|
<p className="text-label-primary text-[15px] font-normal mb-2">
|
|
77
|
-
|
|
79
|
+
{t('resetPasswordAlreadyAccount')}{' '}
|
|
78
80
|
<button
|
|
79
81
|
type="button"
|
|
80
82
|
onClick={() => navigate('/auth')}
|
|
81
83
|
className="text-label-action font-normal underline"
|
|
82
84
|
>
|
|
83
|
-
|
|
85
|
+
{t('logIn')}
|
|
84
86
|
</button>
|
|
85
87
|
<span className="text-label-primary">.</span>
|
|
86
88
|
</p>
|
|
87
89
|
|
|
88
90
|
<p className="text-label-primary text-[15px] font-normal">
|
|
89
|
-
|
|
90
|
-
<a
|
|
91
|
+
{t('forFurtherSupport')}{' '}
|
|
92
|
+
<a
|
|
91
93
|
href="mailto:support@booked.it"
|
|
92
94
|
className="text-label-action font-normal underline"
|
|
93
95
|
>
|
|
94
|
-
|
|
96
|
+
{t('contactUs')}
|
|
95
97
|
</a>
|
|
96
98
|
<span className="text-label-primary">.</span>
|
|
97
99
|
</p>
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
2
3
|
import { ResetPasswordForm } from './ResetPasswordForm';
|
|
3
4
|
import { AuthLayout } from './AuthLayout';
|
|
4
5
|
import { IconUpdate } from '../../../icons';
|
|
5
6
|
export const ResetPasswordPanel: React.FC = () => {
|
|
7
|
+
const { t } = useTranslation(['User']);
|
|
6
8
|
return (
|
|
7
9
|
<AuthLayout
|
|
8
|
-
badgeLabel=
|
|
10
|
+
badgeLabel={t('resetPassword')}
|
|
9
11
|
icon={
|
|
10
12
|
<IconUpdate className="w-16 h-16 text-fill-primary" />
|
|
11
13
|
}
|
|
12
|
-
title=
|
|
13
|
-
subtitle=
|
|
14
|
+
title={t('resetPassword')}
|
|
15
|
+
subtitle={t('resetPasswordSubtitle')}
|
|
14
16
|
>
|
|
15
17
|
<ResetPasswordForm />
|
|
16
18
|
</AuthLayout>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
2
3
|
import { Button } from '../ui/button';
|
|
3
4
|
import { Label } from '../ui/label';
|
|
4
5
|
import { Input } from '../ui/input';
|
|
@@ -10,6 +11,7 @@ export const VerifyEmailForm: React.FC = () => {
|
|
|
10
11
|
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
11
12
|
const navigate = useNavigate();
|
|
12
13
|
const { showSuccess, showError } = useNotify();
|
|
14
|
+
const { t } = useTranslation(['User']);
|
|
13
15
|
|
|
14
16
|
// Add dummy test code on mount for testing
|
|
15
17
|
useEffect(() => {
|
|
@@ -21,7 +23,7 @@ export const VerifyEmailForm: React.FC = () => {
|
|
|
21
23
|
e.preventDefault();
|
|
22
24
|
|
|
23
25
|
if (!code || code.length !== 6) {
|
|
24
|
-
showError('
|
|
26
|
+
showError(t('pleaseEnterValidCode'));
|
|
25
27
|
return;
|
|
26
28
|
}
|
|
27
29
|
|
|
@@ -29,10 +31,10 @@ export const VerifyEmailForm: React.FC = () => {
|
|
|
29
31
|
try {
|
|
30
32
|
// Simulate verification
|
|
31
33
|
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
32
|
-
showSuccess('
|
|
34
|
+
showSuccess(t('emailVerifiedSuccessfully'));
|
|
33
35
|
navigate('/auth/create-password');
|
|
34
36
|
} catch (error) {
|
|
35
|
-
showError('
|
|
37
|
+
showError(t('verificationFailed'));
|
|
36
38
|
} finally {
|
|
37
39
|
setIsSubmitting(false);
|
|
38
40
|
}
|
|
@@ -43,10 +45,10 @@ export const VerifyEmailForm: React.FC = () => {
|
|
|
43
45
|
<form onSubmit={onSubmit} className="flex min-w-60 flex-col items-stretch flex-1 shrink basis-[0%] max-md:max-w-full">
|
|
44
46
|
<div className="mb-6">
|
|
45
47
|
<Label htmlFor="code" className="text-label-primary text-[15px] font-semibold leading-[1.4] mb-2 block">
|
|
46
|
-
|
|
48
|
+
{t('verifyEmailCode')}
|
|
47
49
|
</Label>
|
|
48
50
|
<p className="text-label-secondary text-sm mb-4">
|
|
49
|
-
|
|
51
|
+
{t('verifyEmailDescription')}
|
|
50
52
|
</p>
|
|
51
53
|
<div className="flex gap-2 w-full">
|
|
52
54
|
{[0, 1, 2, 3, 4, 5].map((index) => (
|
|
@@ -85,7 +87,7 @@ export const VerifyEmailForm: React.FC = () => {
|
|
|
85
87
|
size="lg"
|
|
86
88
|
className="mt-2 min-w-[150px] w-fit"
|
|
87
89
|
>
|
|
88
|
-
{isSubmitting ? '
|
|
90
|
+
{isSubmitting ? t('verifying') : t('verifyCode')}
|
|
89
91
|
</Button>
|
|
90
92
|
</form>
|
|
91
93
|
</>
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
2
3
|
import { VerifyEmailForm } from './VerifyEmailForm';
|
|
3
4
|
import { AuthLayout } from './AuthLayout';
|
|
4
5
|
import { IconMail } from '../../../icons';
|
|
5
6
|
export const VerifyEmailPanel: React.FC = () => {
|
|
7
|
+
const { t } = useTranslation(['User']);
|
|
6
8
|
return (
|
|
7
9
|
<AuthLayout
|
|
8
|
-
badgeLabel=
|
|
10
|
+
badgeLabel={t('verifyEmail')}
|
|
9
11
|
icon={
|
|
10
12
|
<IconMail className="w-16 h-16 text-fill-primary" />
|
|
11
13
|
}
|
|
12
|
-
title=
|
|
13
|
-
subtitle=
|
|
14
|
+
title={t('verifyEmail')}
|
|
15
|
+
subtitle={t('verifyEmailPanelSubtitle')}
|
|
14
16
|
>
|
|
15
17
|
<VerifyEmailForm />
|
|
16
18
|
</AuthLayout>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useRef, useState } from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
2
3
|
import { IconUpload, IconCross } from '../../../icons';
|
|
3
4
|
|
|
4
5
|
interface AttachedFile {
|
|
@@ -19,6 +20,7 @@ const formatFileSize = (bytes: number) => {
|
|
|
19
20
|
};
|
|
20
21
|
|
|
21
22
|
const EmailAttachment: React.FC<EmailAttachmentProps> = ({ files, onChange }) => {
|
|
23
|
+
const { t } = useTranslation(['Design']);
|
|
22
24
|
const inputRef = useRef<HTMLInputElement>(null);
|
|
23
25
|
const [isDragging, setIsDragging] = useState(false);
|
|
24
26
|
|
|
@@ -59,7 +61,7 @@ const EmailAttachment: React.FC<EmailAttachmentProps> = ({ files, onChange }) =>
|
|
|
59
61
|
|
|
60
62
|
return (
|
|
61
63
|
<div className="flex flex-col gap-3">
|
|
62
|
-
<h2 className="text-label-primary text-lg font-semibold">
|
|
64
|
+
<h2 className="text-label-primary text-lg font-semibold">{t('attachments')}</h2>
|
|
63
65
|
|
|
64
66
|
{files.length > 0 && (
|
|
65
67
|
<div className="flex flex-col gap-2">
|
|
@@ -105,8 +107,8 @@ const EmailAttachment: React.FC<EmailAttachmentProps> = ({ files, onChange }) =>
|
|
|
105
107
|
>
|
|
106
108
|
<IconUpload size={24} className="fill-fill-secondary" />
|
|
107
109
|
<div className="flex flex-col items-center gap-0.5">
|
|
108
|
-
<span className="text-label-primary text-sm font-medium">
|
|
109
|
-
<span className="text-label-action text-sm font-medium">
|
|
110
|
+
<span className="text-label-primary text-sm font-medium">{t('dragFileToUpload')}</span>
|
|
111
|
+
<span className="text-label-action text-sm font-medium">{t('browseFilesBtn')}</span>
|
|
110
112
|
</div>
|
|
111
113
|
</div>
|
|
112
114
|
</div>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
2
3
|
import { cn } from '../../lib/utils';
|
|
3
4
|
import { buttonVariants } from '../ui/button';
|
|
4
5
|
import {
|
|
@@ -37,6 +38,7 @@ const ConfirmationDialog: React.FC<ConfirmationDialogProps> = ({
|
|
|
37
38
|
mode = 'edit',
|
|
38
39
|
itemName,
|
|
39
40
|
}) => {
|
|
41
|
+
const { t } = useTranslation(['Design']);
|
|
40
42
|
const [confirmationInput, setConfirmationInput] = useState('');
|
|
41
43
|
|
|
42
44
|
useEffect(() => {
|
|
@@ -47,12 +49,12 @@ const ConfirmationDialog: React.FC<ConfirmationDialogProps> = ({
|
|
|
47
49
|
|
|
48
50
|
if (variant === 'cancel') {
|
|
49
51
|
const isCreate = mode === 'create';
|
|
50
|
-
const defaultTitle = isCreate ? '
|
|
52
|
+
const defaultTitle = isCreate ? t('discardTitle') : t('discardChangesTitle');
|
|
51
53
|
const defaultDescription = isCreate
|
|
52
|
-
? '
|
|
53
|
-
: '
|
|
54
|
-
const actionLabel = isCreate ? '
|
|
55
|
-
const cancelLabel = isCreate ? '
|
|
54
|
+
? t('discardProgressDesc')
|
|
55
|
+
: t('discardChangesDesc');
|
|
56
|
+
const actionLabel = isCreate ? t('discard') : t('discardChanges');
|
|
57
|
+
const cancelLabel = isCreate ? t('continue') : t('continueEditing');
|
|
56
58
|
|
|
57
59
|
return (
|
|
58
60
|
<AlertDialog open={open} onOpenChange={onOpenChange}>
|
|
@@ -82,8 +84,8 @@ const ConfirmationDialog: React.FC<ConfirmationDialogProps> = ({
|
|
|
82
84
|
const isDeleteEnabled = !itemName || confirmationInput === itemName;
|
|
83
85
|
|
|
84
86
|
const defaultDescription = itemName
|
|
85
|
-
?
|
|
86
|
-
: '
|
|
87
|
+
? t('deleteNamedItemDesc', { name: itemName })
|
|
88
|
+
: t('deleteItemDesc');
|
|
87
89
|
|
|
88
90
|
const handleConfirm = () => {
|
|
89
91
|
if (isDeleteEnabled) {
|
|
@@ -95,7 +97,7 @@ const ConfirmationDialog: React.FC<ConfirmationDialogProps> = ({
|
|
|
95
97
|
<AlertDialog open={open} onOpenChange={onOpenChange}>
|
|
96
98
|
<AlertDialogContent className="z-50">
|
|
97
99
|
<AlertDialogHeader>
|
|
98
|
-
<AlertDialogTitle>{title || '
|
|
100
|
+
<AlertDialogTitle>{title || t('delete')}</AlertDialogTitle>
|
|
99
101
|
<AlertDialogDescription className="whitespace-pre-line">
|
|
100
102
|
{description || defaultDescription}
|
|
101
103
|
</AlertDialogDescription>
|
|
@@ -104,7 +106,7 @@ const ConfirmationDialog: React.FC<ConfirmationDialogProps> = ({
|
|
|
104
106
|
{itemName && (
|
|
105
107
|
<div className="space-y-2">
|
|
106
108
|
<Label htmlFor="confirm-name" className="text-label-primary text-sm">
|
|
107
|
-
|
|
109
|
+
{t('typeWord')} <span className="font-semibold">{itemName}</span> {t('toConfirmDeletion')}
|
|
108
110
|
</Label>
|
|
109
111
|
<Input
|
|
110
112
|
id="confirm-name"
|
|
@@ -122,9 +124,9 @@ const ConfirmationDialog: React.FC<ConfirmationDialogProps> = ({
|
|
|
122
124
|
disabled={!isDeleteEnabled}
|
|
123
125
|
className={cn(buttonVariants({ variant: "destructive" }), "disabled:opacity-50 disabled:cursor-not-allowed")}
|
|
124
126
|
>
|
|
125
|
-
|
|
127
|
+
{t('delete')}
|
|
126
128
|
</AlertDialogAction>
|
|
127
|
-
<AlertDialogCancel>
|
|
129
|
+
<AlertDialogCancel>{t('cancel')}</AlertDialogCancel>
|
|
128
130
|
</AlertDialogFooter>
|
|
129
131
|
</AlertDialogContent>
|
|
130
132
|
</AlertDialog>
|
|
@@ -32,7 +32,7 @@ export const ZoneForm = ({
|
|
|
32
32
|
const { t } = useTranslation('Design')
|
|
33
33
|
const form = useForm<ZoneFormValues>({
|
|
34
34
|
mode: 'onChange',
|
|
35
|
-
defaultValues: { zoneRecurrences: [] },
|
|
35
|
+
defaultValues: { zoneRecurrences: [], sameStartTimeDaily: true },
|
|
36
36
|
})
|
|
37
37
|
|
|
38
38
|
const { reset, setError, handleSubmit, watch } = form
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { Row, Col } from 'react-bootstrap'
|
|
1
|
+
import { Row, Col, Form } from 'react-bootstrap'
|
|
2
|
+
import { useFormContext } from 'react-hook-form'
|
|
3
|
+
import { useTranslation } from 'react-i18next'
|
|
2
4
|
import { WorkHour } from '@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper'
|
|
3
5
|
import { NameControl } from './NameControl'
|
|
4
6
|
import { ZoneTypeControl } from './ZoneTypeControl'
|
|
@@ -18,10 +20,26 @@ export const ZoneControl = ({
|
|
|
18
20
|
isLoading,
|
|
19
21
|
workHours,
|
|
20
22
|
timeZone,
|
|
21
|
-
}: ZoneControlProps) =>
|
|
23
|
+
}: ZoneControlProps) => {
|
|
24
|
+
const { register, watch, setValue } = useFormContext()
|
|
25
|
+
const { t } = useTranslation('Design')
|
|
26
|
+
const sameStartTimeDaily = watch('sameStartTimeDaily')
|
|
27
|
+
|
|
28
|
+
return (
|
|
22
29
|
<Row>
|
|
23
30
|
<Col md={6} sm={12} className='pr-5'>
|
|
24
31
|
<NameControl isLoading={isLoading} />
|
|
32
|
+
<Form.Group>
|
|
33
|
+
<input type='hidden' {...register('sameStartTimeDaily')} />
|
|
34
|
+
<Form.Check
|
|
35
|
+
type='switch'
|
|
36
|
+
id='sameStartTimeDailySwitch'
|
|
37
|
+
label={t('sameStartTimeDaily')}
|
|
38
|
+
disabled={isLoading}
|
|
39
|
+
checked={sameStartTimeDaily === true || sameStartTimeDaily === 'true'}
|
|
40
|
+
onChange={(e) => setValue('sameStartTimeDaily', e.target.checked, { shouldDirty: true })}
|
|
41
|
+
/>
|
|
42
|
+
</Form.Group>
|
|
25
43
|
<ZoneRecurrencesControl workHours={workHours} timeZone={timeZone} />
|
|
26
44
|
<hr />
|
|
27
45
|
<Row>
|
|
@@ -42,4 +60,5 @@ export const ZoneControl = ({
|
|
|
42
60
|
</Row>
|
|
43
61
|
</Col>
|
|
44
62
|
</Row>
|
|
45
|
-
)
|
|
63
|
+
)
|
|
64
|
+
}
|