diff --git a/app/components/Slider.module.css b/app/components/Slider.module.css
deleted file mode 100644
index ad51411..0000000
--- a/app/components/Slider.module.css
+++ /dev/null
@@ -1,32 +0,0 @@
-.embla {
- --slide-height: 19rem;
- --slide-spacing: 1rem;
-}
-
-.embla__viewport {
- overflow: hidden;
-}
-
-.embla__container {
- backface-visibility: hidden;
- display: flex;
- touch-action: pan-y pinch-zoom;
- margin-left: calc(var(--slide-spacing) * -1);
-}
-
-.embla__slide {
- @media (max-width: $mantine-breakpoint-sm) {
- flex: 0 0 100%;
- }
-
- @media (min-width: $mantine-breakpoint-sm) {
- flex: 0 0 25%;
- }
-
- @media (min-width: $mantine-breakpoint-md) {
- flex: 0 0 20%;
- }
-
- min-width: 0;
- padding-left: var(--slide-spacing);
-}
diff --git a/app/components/Slider.tsx b/app/components/Slider.tsx
deleted file mode 100644
index b0fbbac..0000000
--- a/app/components/Slider.tsx
+++ /dev/null
@@ -1,31 +0,0 @@
-import Autoplay from 'embla-carousel-autoplay';
-import useEmblaCarousel from 'embla-carousel-react';
-import {type PropsWithChildren} from 'react';
-import classes from './Slider.module.css';
-
-export function Slider({
- children,
- language,
-}: PropsWithChildren & {language: string}) {
- const [emblaRef] = useEmblaCarousel(
- {
- loop: true,
- align: 'start',
- dragFree: true,
- direction: language === 'AR' ? 'rtl' : 'ltr',
- },
- [Autoplay()],
- );
-
- return (
-
- );
-}
-
-export function Slice({children}: PropsWithChildren) {
- return
{children}
;
-}
diff --git a/app/root.tsx b/app/root.tsx
index 6515a1b..566d359 100644
--- a/app/root.tsx
+++ b/app/root.tsx
@@ -1,4 +1,3 @@
-import carouselStyles from '@mantine/carousel/styles.css?url';
import {
ColorSchemeScript,
DirectionProvider,
@@ -67,7 +66,6 @@ export const shouldRevalidate: ShouldRevalidateFunction = ({
export const links = () => {
return [
{rel: 'stylesheet', href: appStyles},
- {rel: 'stylesheet', href: carouselStyles},
{rel: 'stylesheet', href: coreStyles},
{rel: 'stylesheet', href: nprogressStyles},
{
diff --git a/app/routes/business.locations._index.tsx b/app/routes/business.locations._index.tsx
index 91c7f9e..e53ef9f 100644
--- a/app/routes/business.locations._index.tsx
+++ b/app/routes/business.locations._index.tsx
@@ -27,7 +27,7 @@ import {getCustomer} from '~/lib/get-customer';
export async function loader({context}: LoaderFunctionArgs) {
const customerId = await getCustomer({context});
const {payload: locations} =
- await getBookingShopifyApi().customerLocationList(customerId, context);
+ await getBookingShopifyApi().customerLocationList(customerId);
return json({locations});
}
diff --git a/app/routes/business.locations.create.tsx b/app/routes/business.locations.create.tsx
index de85a62..937eddb 100644
--- a/app/routes/business.locations.create.tsx
+++ b/app/routes/business.locations.create.tsx
@@ -25,7 +25,6 @@ import {RadioGroup} from '~/components/form/RadioGroup';
import {SubmitButton} from '~/components/form/SubmitButton';
import {getBookingShopifyApi} from '~/lib/api/bookingShopifyApi';
import {CustomerLocationBaseLocationType} from '~/lib/api/model';
-import {baseURL} from '~/lib/api/mutator/query-client';
const schema = customerLocationCreateBody;
@@ -45,10 +44,6 @@ export const action = async ({request, context}: ActionFunctionArgs) => {
submission.value,
);
- await context.storefront.cache?.delete(
- `${baseURL}/customer/${customerId}/locations`,
- );
-
return redirect('/business/locations');
} catch (error) {
return submission.reply();
diff --git a/app/routes/business.public._index.tsx b/app/routes/business.public._index.tsx
index 995a436..f117b04 100644
--- a/app/routes/business.public._index.tsx
+++ b/app/routes/business.public._index.tsx
@@ -109,25 +109,6 @@ export default function AccountBusiness() {
]}
/>
-
-
-
-
-
-
+
+
+
+
+
+
Gem ændringer
diff --git a/app/routes/business.services.create.tsx b/app/routes/business.services.create.tsx
index 93c847a..a18790d 100644
--- a/app/routes/business.services.create.tsx
+++ b/app/routes/business.services.create.tsx
@@ -47,7 +47,6 @@ import {
type CustomerProductLocationsItem,
type OpenAIProductTitle200Payload,
} from '~/lib/api/model';
-import {baseURL} from '~/lib/api/mutator/query-client';
import {convertHTML} from '~/lib/convertHTML';
import {getCustomer} from '~/lib/get-customer';
import {customerProductAddBody} from '~/lib/zod/bookingShopifyApi';
@@ -75,10 +74,6 @@ export const action = async ({request, context}: ActionFunctionArgs) => {
},
);
- await context.storefront.cache?.delete(
- `${baseURL}/customer/${customerId}/products`,
- );
-
return redirect(`/business/services/${product.productId}`);
} catch (error) {
return submission.reply();
@@ -99,10 +94,10 @@ export async function loader({context}: LoaderFunctionArgs) {
);
const {payload: schedules} =
- await getBookingShopifyApi().customerScheduleList(customerId, context);
+ await getBookingShopifyApi().customerScheduleList(customerId);
const {payload: locations} =
- await getBookingShopifyApi().customerLocationList(customerId, context);
+ await getBookingShopifyApi().customerLocationList(customerId);
if (locations.length === 0 || schedules.length === 0) {
return redirect('/business/services');
@@ -163,7 +158,7 @@ export default function AccountServicesCreate() {
const aiSuggestion = useCallback(() => {
fetcher.submit(
{title: fields.title.value || ''},
- {action: '/business/api/ai-suggestion'},
+ {action: '/business/api/ai/product'},
);
}, [fetcher, fields.title.value]);
@@ -174,13 +169,21 @@ export default function AccountServicesCreate() {
name: fields.productType.name,
value: fetcher.data.collection?.title || '',
});
+ form.update({
+ name: fields.price.name,
+ value: {
+ amount: fetcher.data.price,
+ currencyCode: 'DKK',
+ },
+ });
setDescriptionHtml(fetcher.data.description);
- fetcher.load('/business/api/ai-suggestion'); //reset
+ fetcher.load('/api/reset'); //reset
}
}, [
fetcher,
fetcher.data,
fetcher.state,
+ fields.price.name,
fields.productType.name,
fields.title.name,
fields.title.value,
diff --git a/package-lock.json b/package-lock.json
index abfe8ca..4867c87 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -16,7 +16,6 @@
"@fullcalendar/interaction": "^6.1.14",
"@fullcalendar/react": "^6.1.14",
"@fullcalendar/timegrid": "^6.1.14",
- "@mantine/carousel": "^7.11.0",
"@mantine/core": "^7.11.0",
"@mantine/hooks": "^7.11.0",
"@mantine/modals": "^7.11.0",
@@ -44,8 +43,6 @@
"country-flag-icons": "^1.5.11",
"date-fns": "^2.30.0",
"date-fns-tz": "^2.0.1",
- "embla-carousel-autoplay": "^7.1.0",
- "embla-carousel-react": "^7.1.0",
"graphql": "^16.6.0",
"graphql-tag": "^2.12.6",
"i18next": "^23.11.5",
@@ -3585,18 +3582,6 @@
"@lit-labs/ssr-dom-shim": "^1.0.0"
}
},
- "node_modules/@mantine/carousel": {
- "version": "7.11.0",
- "resolved": "https://registry.npmjs.org/@mantine/carousel/-/carousel-7.11.0.tgz",
- "integrity": "sha512-NVyChCtBfi8HOZkN6i9FPC2ZGkjjaNTtZDsbu22rYb3iHteKDS76Hp5hy04b2eLGwglHERCMeZu4g5Nf2ZSa/Q==",
- "peerDependencies": {
- "@mantine/core": "7.11.0",
- "@mantine/hooks": "7.11.0",
- "embla-carousel-react": ">=7.0.0",
- "react": "^18.2.0",
- "react-dom": "^18.2.0"
- }
- },
"node_modules/@mantine/core": {
"version": "7.11.0",
"resolved": "https://registry.npmjs.org/@mantine/core/-/core-7.11.0.tgz",
@@ -11035,30 +11020,6 @@
"integrity": "sha512-nkoEX2QIB8kwCOtvtgwhXWy2IHVcOLQZu9Qo36uaGB835mdX/h8uLRlosL6QIhLVUnAiicXRW00PwaPZC74Nrg==",
"devOptional": true
},
- "node_modules/embla-carousel": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/embla-carousel/-/embla-carousel-7.1.0.tgz",
- "integrity": "sha512-Bh8Pa8NWzgugLkf8sAGexQlBCNDFaej5BXiKgQdRJ1mUC9NWBrw9Z23YVPVGkguWoz5LMjZXXFVGCobl3UPt/Q=="
- },
- "node_modules/embla-carousel-autoplay": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/embla-carousel-autoplay/-/embla-carousel-autoplay-7.1.0.tgz",
- "integrity": "sha512-nYfgSGn3ek44OzwO0t/Ptuxq4PNPD5l7Y9X7JjLYI/DN1uGjqxz9L73YYqR6YCRDnTYJ88s9fep48dzBnSG4vQ==",
- "peerDependencies": {
- "embla-carousel": "7.1.0"
- }
- },
- "node_modules/embla-carousel-react": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/embla-carousel-react/-/embla-carousel-react-7.1.0.tgz",
- "integrity": "sha512-tbYRPRZSDNd2QLNqYDcArAakGIxtUbhS7tkP0dGXktXHGgcX+3ji3VrOUTOftBiujZrMV8kRxtrRUe/1soloIQ==",
- "dependencies": {
- "embla-carousel": "7.1.0"
- },
- "peerDependencies": {
- "react": "^16.8.0 || ^17.0.1 || ^18.0.0"
- }
- },
"node_modules/emoji-regex": {
"version": "9.2.2",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
diff --git a/package.json b/package.json
index a6c0458..ec4c339 100644
--- a/package.json
+++ b/package.json
@@ -30,7 +30,6 @@
"@fullcalendar/interaction": "^6.1.14",
"@fullcalendar/react": "^6.1.14",
"@fullcalendar/timegrid": "^6.1.14",
- "@mantine/carousel": "^7.11.0",
"@mantine/core": "^7.11.0",
"@mantine/hooks": "^7.11.0",
"@mantine/modals": "^7.11.0",
@@ -58,8 +57,6 @@
"country-flag-icons": "^1.5.11",
"date-fns": "^2.30.0",
"date-fns-tz": "^2.0.1",
- "embla-carousel-autoplay": "^7.1.0",
- "embla-carousel-react": "^7.1.0",
"graphql": "^16.6.0",
"graphql-tag": "^2.12.6",
"i18next": "^23.11.5",