edit ios & api

This commit is contained in:
2026-06-13 16:43:43 +03:30
parent 3c2db09447
commit 3d8590ba66
7 changed files with 48 additions and 14 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="icon" type="image/png" href="/icons/icon-192.png" /> <link rel="icon" type="image/png" href="/icons/icon-192.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
<meta name="theme-color" content="#16a34a" /> <meta name="theme-color" content="#16a34a" />
<link rel="manifest" href="/site.webmanifest" /> <link rel="manifest" href="/site.webmanifest" />
<title>منتایم</title> <title>منتایم</title>
+7 -1
View File
@@ -11,6 +11,12 @@ export function fetchMyBusinessRegistrations() {
export function submitBusinessRegistration(payload: CreateBusinessRegistrationPayload) { export function submitBusinessRegistration(payload: CreateBusinessRegistrationPayload) {
return api<BusinessRegistrationRequest>('/business-registration-requests', { return api<BusinessRegistrationRequest>('/business-registration-requests', {
method: 'POST', method: 'POST',
body: JSON.stringify(payload), body: JSON.stringify({
title: payload.businessTitle,
categoryId: payload.categoryId,
description: payload.description,
address: payload.address,
contactPhone: payload.phone,
}),
}); });
} }
+6 -1
View File
@@ -11,6 +11,11 @@ export function fetchMyServiceRequests() {
export function createServiceRequest(payload: CreateBusinessServiceRequestPayload) { export function createServiceRequest(payload: CreateBusinessServiceRequestPayload) {
return api<BusinessServiceRequest>('/business-service-requests', { return api<BusinessServiceRequest>('/business-service-requests', {
method: 'POST', method: 'POST',
body: JSON.stringify(payload), body: JSON.stringify({
title: payload.title,
description: payload.description,
price: payload.price,
durationMinutes: payload.durationMinutes,
}),
}); });
} }
+2 -2
View File
@@ -1,7 +1,7 @@
<template> <template>
<div class="min-h-dvh w-full bg-surface-2 lg:bg-surface-3"> <div class="app-shell-root min-h-[100dvh] w-full bg-surface-2 lg:bg-surface-3">
<div <div
class="mx-auto flex h-dvh max-h-dvh w-full min-w-0 max-w-full flex-col overflow-hidden bg-surface shadow-xl shadow-black/5 dark:shadow-black/30 max-w-app lg:max-w-none lg:shadow-none" class="app-shell-frame mx-auto flex h-[100dvh] max-h-[100dvh] w-full min-w-0 max-w-full flex-col overflow-hidden bg-surface shadow-xl shadow-black/5 dark:shadow-black/30 max-w-app lg:max-w-none lg:shadow-none"
> >
<slot /> <slot />
</div> </div>
+3 -3
View File
@@ -1,7 +1,7 @@
<template> <template>
<AppShell> <AppShell>
<header <header
class="z-20 flex shrink-0 items-center justify-between border-b border-border bg-surface/95 px-4 py-3 backdrop-blur" class="z-20 flex shrink-0 items-center justify-between border-b border-border bg-surface/95 px-4 py-3 backdrop-blur supports-[backdrop-filter]:bg-surface/80 pt-[max(0.75rem,env(safe-area-inset-top))]"
> >
<div class="flex min-w-0 items-center gap-3"> <div class="flex min-w-0 items-center gap-3">
<AppLogo variant="horizontal" class="h-9 shrink-0" /> <AppLogo variant="horizontal" class="h-9 shrink-0" />
@@ -12,14 +12,14 @@
</div> </div>
</header> </header>
<main class="min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-y-contain lg:px-0"> <main class="min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-y-contain [-webkit-overflow-scrolling:touch] lg:px-0">
<div class="mx-auto min-w-0 w-full max-w-full px-4 py-4 lg:max-w-7xl lg:px-8 lg:py-0"> <div class="mx-auto min-w-0 w-full max-w-full px-4 py-4 lg:max-w-7xl lg:px-8 lg:py-0">
<slot /> <slot />
</div> </div>
</main> </main>
<nav <nav
class="z-20 shrink-0 border-t border-border bg-surface/95 px-2 py-2 backdrop-blur" class="z-20 shrink-0 border-t border-border bg-surface/95 px-2 py-2 backdrop-blur supports-[backdrop-filter]:bg-surface/80 pb-[max(0.5rem,env(safe-area-inset-bottom))]"
> >
<div class="grid gap-1" :class="mobileNavGridClass"> <div class="grid gap-1" :class="mobileNavGridClass">
<template v-for="item in mobileNavItems" :key="`mobile-${item.key}`"> <template v-for="item in mobileNavItems" :key="`mobile-${item.key}`">
+24
View File
@@ -29,6 +29,28 @@
scrollbar-width: none; scrollbar-width: none;
-ms-overflow-style: none; -ms-overflow-style: none;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
height: 100%;
overflow: hidden;
}
@supports (-webkit-touch-callout: none) {
html,
body,
#app {
height: 100%;
overflow: hidden;
}
.app-shell-root {
min-height: 100%;
min-height: -webkit-fill-available;
}
.app-shell-frame {
height: 100%;
max-height: 100%;
min-height: -webkit-fill-available;
}
} }
html::-webkit-scrollbar { html::-webkit-scrollbar {
@@ -66,5 +88,7 @@
#app { #app {
min-height: 100dvh; min-height: 100dvh;
height: 100%;
overflow: hidden;
} }
} }
+5 -6
View File
@@ -177,8 +177,7 @@ export function totalPriceForServices(
classes: BusinessServiceClass[], classes: BusinessServiceClass[],
classId?: string | null, classId?: string | null,
): number | null { ): number | null {
if (usesServiceClasses(classesEnabled, classes)) { if (classId && (classesEnabled || usesServiceClasses(classesEnabled, classes))) {
if (!classId) return null;
let total = 0; let total = 0;
for (const service of services) { for (const service of services) {
const price = resolvedServicePrice(service, classId); const price = resolvedServicePrice(service, classId);
@@ -209,10 +208,10 @@ export function sumServicesPrice(
classId?: string, classId?: string,
): number { ): number {
if (perClass && classId) { if (perClass && classId) {
return ( return services.reduce((sum, service) => {
totalPriceForServices(services, true, [], classId) ?? const price = resolvedServicePrice(service, classId) ?? service.price;
services.reduce((sum, service) => sum + Number.parseFloat(service.price), 0) return sum + Number.parseFloat(price);
); }, 0);
} }
return services.reduce((sum, service) => sum + Number.parseFloat(service.price), 0); return services.reduce((sum, service) => sum + Number.parseFloat(service.price), 0);
} }