- Introduced NumberField for price input and TextareaField for service description in the ServiceDataCard component. - Updated ServiceCard component to display the new description and price fields, enhancing service details visibility. - Added formatMoney utility for consistent currency formatting across the application. - Updated GraphQL fragments and types to include price and description fields for services.
36 lines
623 B
GraphQL
36 lines
623 B
GraphQL
fragment ServiceFields on Service {
|
|
documentId
|
|
name
|
|
description
|
|
price
|
|
active
|
|
duration
|
|
master {
|
|
...CustomerFields
|
|
}
|
|
}
|
|
|
|
query GetServices($filters: ServiceFiltersInput) {
|
|
services(filters: $filters, sort: "name:asc") {
|
|
...ServiceFields
|
|
}
|
|
}
|
|
|
|
query GetService($documentId: ID!) {
|
|
service(documentId: $documentId) {
|
|
...ServiceFields
|
|
}
|
|
}
|
|
|
|
mutation CreateService($data: ServiceInput!) {
|
|
createService(data: $data) {
|
|
...ServiceFields
|
|
}
|
|
}
|
|
|
|
mutation UpdateService($documentId: ID!, $data: ServiceInput!) {
|
|
updateService(documentId: $documentId, data: $data) {
|
|
...ServiceFields
|
|
}
|
|
}
|