fix services
This commit is contained in:
@@ -3,8 +3,6 @@ import type { z } from 'astro/zod'
|
||||
import { YCLIENTS_TOKEN, YCLIENTS_API_URL } from 'astro:env/server'
|
||||
|
||||
type HTML = string
|
||||
const currencyFormatter = Intl.NumberFormat('ru', { currency: 'rub' })
|
||||
|
||||
// const RENT_GYM_SERVICE: z.infer<typeof servicesSchema> = {
|
||||
// title: 'Аренда зала',
|
||||
// charachteristics: [
|
||||
@@ -81,14 +79,13 @@ export const yclientsClient = {
|
||||
.filter((service) => service.category_id === categoryItem.id)
|
||||
.map((service) => ({
|
||||
title: service.title,
|
||||
price: `${currencyFormatter.format(service.price_min)} ₽`,
|
||||
description: service.comment,
|
||||
link: {
|
||||
title: 'Записаться',
|
||||
href: `https://n1381542.yclients.com/company/1254211/personal/select-services?o=s${service.id}`,
|
||||
},
|
||||
})),
|
||||
}))
|
||||
})).filter(item => item.charachteristics.length > 0)
|
||||
|
||||
return services
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user