62 Commits

Author SHA1 Message Date
vchikalkin
a831aeb212 highlight days in horizontal calendar 2025-06-25 18:20:47 +03:00
vchikalkin
2ca11832a9 highlight days with slots in schedule calendar 2025-06-25 17:57:41 +03:00
vchikalkin
28bceab36d take into account cancelled and completed orders in the slot list 2025-06-25 16:27:49 +03:00
vchikalkin
24f71a9b66 add order status alert 2025-06-24 13:47:53 +03:00
vchikalkin
e861e6e917 order page: add buttons 2025-06-24 12:36:43 +03:00
vchikalkin
832f65714d app/profile: show shared orders 2025-06-24 11:26:26 +03:00
vchikalkin
2ba56c5949 order page 2025-06-23 20:15:19 +03:00
vchikalkin
085263654f fix create order query 2025-06-11 14:55:36 +03:00
vchikalkin
a7f00a3811 graphql: remove rename operations files 2025-06-10 17:15:31 +03:00
vchikalkin
25c90984dc fix queries, using formatDate & formatTime on client 2025-06-10 17:11:55 +03:00
vchikalkin
d15dd9ada7 packages: radash -> radashi 2025-06-10 15:36:01 +03:00
vchikalkin
d085a3d24d horizontal-calendar: switch months by arrow buttons 2025-06-08 17:21:31 +03:00
vchikalkin
0cb9e6b6ee graphql/api: remove throw new Error 2025-06-08 17:17:08 +03:00
vchikalkin
e4ec942a9c fix orders list in slot page 2025-06-08 17:13:53 +03:00
vchikalkin
f63ca6d93e add numberOfDaysBefore param 2025-06-08 15:14:55 +03:00
vchikalkin
a9efcfccf2 optimize orders list fetching 2025-06-08 14:59:13 +03:00
vchikalkin
f4609eb8d1 add horizontal calendar 2025-06-08 14:32:01 +03:00
vchikalkin
a4608ead43 fix slots queries 2025-05-23 16:08:20 +03:00
vchikalkin
c710537727 replace ScheduleTimeContext with ScheduleStore 2025-05-23 14:32:39 +03:00
vchikalkin
d8f853180b app/orders: fill page with content 2025-05-21 18:40:53 +03:00
vchikalkin
ebe8ee5437 fix build 2025-05-21 17:47:53 +03:00
vchikalkin
0698242257 take into existing orders when computing times 2025-05-21 17:26:10 +03:00
vchikalkin
f0b63a5e7e fix GetSlotsOrders order 2025-05-21 16:30:44 +03:00
vchikalkin
52d68964f1 take into service duration when computing times 2025-05-21 16:27:56 +03:00
vchikalkin
0b867a9136 getAvailableTimeSlots: add filter by orders 2025-05-20 19:53:51 +03:00
vchikalkin
b8880eedee move getAvailableTimeSlots to server 2025-05-20 19:25:25 +03:00
Vlad Chikalkin
9314cdd1cb
merge branch 'refactor-api' (#23)
* refactor customer api

* refactor slots api

* hooks/customers: use invalidateQueries

* refactor services api

* optimize hooks queryKey

* refactor orders api

* typo refactor hooks

* fix telegramId type (number)

* fix bot with new api

* rename customers masters & clients query

* fix useClientsQuery & useMastersQuery query

* new line after 'use client' & 'use server' directives
2025-05-20 14:27:51 +03:00
vchikalkin
fda1a0a531 packages/graphql: add eslint 2025-05-10 15:46:33 +03:00
vchikalkin
1528cc25b8 create order works! 2025-05-08 19:30:00 +03:00
vchikalkin
4f87d17e8e slot list: render immediately 2025-04-01 17:20:30 +03:00
vchikalkin
b6d7fabba1 add service select 2025-03-10 18:18:23 +03:00
Vlad Chikalkin
06be87f0ec
Feature/records (#22)
* components/profile: rename components files

* components/profile: organize files & folders

* split DataCard to 2 components

* [2] components/profile: organize files & folders

* data-card: fix phone field disabled

* fix card header color

* add schedule button for master

* fix navigation & profile background

* add basic schedule page

* fix bottom navbar overflows content

* header: remove bottom margin

* replace vanilla calendar with shadcn/ui one

* add slot functional

* fix forbidden error

* add slot operations

* show slots

* filter by selected day

* add hook useSlots
fix update slots list after add slot
fix initial fetch slots

* use slots hooks

* split edit-slot-form into files

* rename /time-slots -> /components

* refactor components & folders structure

* add feature: delete slot

* hooks/slot: update query keys

* add hooks/profile

* add hook useProfileMutation

* use useProfileMutation hook for update role

* rename useProfile -> useProfileQuery

* fix useProfileQuery queryKey

* add hook useContactsQuery

* remove unused ternary operator

* header: add backdrop blur

* create slot cards

* fix elements y center

* fix getSlots filters

* ui/ux improvements

* fix date time types & names

* move profile components from sub folder

* add basic slot page

* fix add slot form padding x

* add slot buttons

* extend slot card information

* fix import type

* use Container in pages

* change orange -> yellow for dark

* use Loading spinner in slots list

* refactor \components\schedule dir structure

* add orders list

* change query & mutation keys

* change url /profile/schedule/slot/ -> /slots/

* order: show services

* remove prefetchQuery

* bring the results of queries and hooks into a single form

* react query: globally show error toast

* add font inter

* fix header: center text

* orders: add sorting

* order card: add avatar

* rename records -> orders

* reduced text size

* fix slot buttons

* fix datetime card ui

* fix header: center text (finally)

* layout/container: last:mb-4

* fix type

* slot-datetime: use ReadonlyTimeRange

* rename files & components

* remove unnecessary context using

* feature: edit slot time

* fix: selected day reset after go back to /schedule

* rename AddTimeRange -> EditableTimeRangeForm & refactor

* fix some elements on page before data loaded

* fix text size

* slot-card: remove gap

* slot-date: remove margin

* fix slots & orders layout

* toast: show error text in ui
2025-02-20 18:11:28 +03:00
Vlad Chikalkin
427cc6b5d8
Feature/back button (#17)
* prepare for header back button: fix pages layout
add header with back button

* set header title

* optimize layout

* remove navigation context

* make profile photo bigger

* remove page-header from main pages

* fix profile layout

* profile: use ui/Card

* fix app background

* contacts: use ui/Card component
2025-01-27 17:28:28 +03:00
Vlad Chikalkin
10b36978fe
Feature/10 contacts (#16)
* apps/bot: add feature add contact

* apps/bot: check role 'master' before add contact

* apps/bot: rename createCustomer -> createUser

* remove ';'

* app/bot: add contact define name & phone

* apps/bot: check user already exists w/o telegramId (invited)

* Чтобы добавить контакт, сначала поделитесь своим номером телефона.

* apps/bot: create or update functions

* apps/bot: remove api.ts -> move getCustomer to packages/graphql/api

* packages/graphql: add api/customer tests

* tests for createOrUpdateClient

* fix(apps/web): user is undefined

* fix(apps/web): actions getCustomer

* feat(apps/web): update user photo on app launch

* rename page 'masters' -> 'contacts'

* feat(apps/web): add basic /contacts page

* fix app layout

* refactor customer queries

* add action getProfile

* get customer contacts

* use zustand for contacts

* add loading spinner

* rename filteredContacts -> contacts

* replace zustand with @tanstack/react-query

* profile: use react-query

* refactor updateRole function

* move updateRole closer to profile-card

* beautify actions

* add page 'profile/[telegramId]'

* profile: add button "message to telegram"

* profile: add call feature

* app/bot: normalize phone before register

* do not open keyboard on page load

* contacts: loading spinner

* telegram login: customer.active=true

* update name on telegram first login
2025-01-20 18:11:33 +03:00
vchikalkin
f4377f160f packages: cleanup catalog 2025-01-10 12:27:44 +03:00
Vlad Chikalkin
b936a79c2b
feature/profile-page (#8)
* 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
2025-01-10 11:51:14 +03:00
vchikalkin
ec4fef85d3 packages/ui: fix imports 2024-12-23 23:27:31 +03:00
vchikalkin
5b996fbf68 refactor packages/graphql structure 2024-12-23 19:55:58 +03:00
vchikalkin
5d8b2ffc6b move all graphql functional to packages/graphql 2024-12-23 19:07:25 +03:00
vchikalkin
4ecac41396 apps/bot: check user already exists 2024-12-23 15:14:18 +03:00
vchikalkin
1d4584bd6f apps/bot: add create-customer functional 2024-12-22 17:24:32 +03:00
vchikalkin
ab65579ccc pnpx codemod pnpm/catalog 2024-12-17 15:18:42 +03:00
vchikalkin
3e1cfdd7fe packages/ui: disable lint-staged 2024-12-17 13:00:46 +03:00
vchikalkin
12baf41612 repo: move graphql files to packages/graphql 2024-12-17 12:59:53 +03:00
vchikalkin
c05c77c578 add header 2024-12-16 21:34:02 +03:00
vchikalkin
aa3ca43730 packages: upgrade 2024-12-09 15:57:33 +03:00
vchikalkin
1e06d6da23 packages: add lint-staged-config 2024-11-28 11:45:47 +03:00
vchikalkin
b159d811b5 pnpm catalog 2024-11-27 23:28:16 +03:00
vchikalkin
e8dabbb2e5 packages: add lint-staged 2024-11-27 23:22:39 +03:00
vchikalkin
5693186d1b fix packages\ui\components.json 2024-11-27 21:52:38 +03:00