* add basic profile page * apps/web: detect telegram/browser support browser (dev only) * apps/web: add dark mode * apps/web: support dark theme in tma * apps/web: add loading spinner remove dev info from page * apps\web\app\(auth)\page.tsx: remove useState * app/web: handle update profile name * move debounce functional to hook * add role checkbox
28 lines
605 B
GraphQL
28 lines
605 B
GraphQL
fragment CustomerProfile on Customer {
|
|
active
|
|
documentId
|
|
name
|
|
phone
|
|
photoUrl
|
|
role
|
|
telegramId
|
|
}
|
|
|
|
mutation CreateCustomer($name: String!, $telegramId: Long!, $phone: String!) {
|
|
createCustomer(data: { name: $name, telegramId: $telegramId, phone: $phone, role: client }) {
|
|
...CustomerProfile
|
|
}
|
|
}
|
|
|
|
query GetCustomer($telegramId: Long!) {
|
|
customers(filters: { telegramId: { eq: $telegramId } }) {
|
|
...CustomerProfile
|
|
}
|
|
}
|
|
|
|
mutation UpdateCustomerProfile($documentId: ID!, $data: CustomerInput!) {
|
|
updateCustomer(documentId: $documentId, data: $data) {
|
|
...CustomerProfile
|
|
}
|
|
}
|