vchikalkin
2c968e9899
refactor: consolidate order lifecycle validation logic and remove slot lifecycle
...
- Streamlined the order lifecycle by consolidating validation logic and removing redundant error handling.
- Deleted the slot lifecycle file to simplify the codebase, as its functionality is no longer needed.
- This change enhances maintainability and reduces complexity in the order management system.
2025-08-11 14:41:12 +03:00
vchikalkin
b0aa644435
feat: add update check to order and slot lifecycles
...
- Implemented a check in both order and slot lifecycles to skip validation if the record is being updated, identified by the presence of the 'publishedAt' field. This change prevents unnecessary validation for existing records.
2025-08-03 13:56:43 +03:00
vchikalkin
63a68c6089
refactor: comment out beforeDelete lifecycle method in slot API
...
- Temporarily disabled the beforeDelete method to prevent slot deletion checks related to existing orders. This change is intended for further review and potential reimplementation.
2025-08-02 19:26:38 +03:00
vchikalkin
7a89cfa7ce
fix: update slot start time validation to check against the current day
...
- Modified the validation logic to ensure that the slot start time is not before the current day, preventing past slots from being created.
2025-08-02 18:37:42 +03:00
vchikalkin
cfa5a02ca9
feat: add validation to prevent order creation in the past
...
- Introduced a new error message for attempts to create orders with a start time in the past.
- Implemented a check in the order lifecycle to validate that the order start time is not before the current time.
2025-08-02 11:19:21 +03:00
vchikalkin
50f23f67b3
feat: update customer and service schemas to enforce maxLength and required attributes
...
- Added maxLength constraints to 'name' and 'phone' attributes in customer and service schemas.
- Marked 'name' as required in both schemas.
- Updated TypeScript definitions to reflect these changes.
2025-08-02 11:15:21 +03:00
vchikalkin
3833a1a23d
feat: enhance extractId function to support 'connect' input for ID retrieval
2025-08-02 11:04:53 +03:00
Vlad Chikalkin
d592c9cf31
feat: add 'active' boolean attribute to content type schema and TypeScript definitions ( #5 )
2025-08-01 19:53:47 +03:00
vchikalkin
34fff838f9
fix: read botToken
2025-07-23 14:06:38 +03:00
vchikalkin
8b2c7396c3
fix: add BOT_TOKEN environment variable to docker-compose for Telegram integration
2025-07-23 13:27:58 +03:00
Vlad Chikalkin
c22357b71e
feat: integrate Telegraf for Telegram notifications in order lifecycle ( #4 )
...
- Added Telegraf dependency to handle Telegram bot interactions.
- Updated order lifecycle methods to send notifications upon order creation and updates.
- Refactored datetime handling to use a consistent timezone.
- Removed unused utility functions to streamline codebase.
2025-07-23 13:14:02 +03:00
vchikalkin
7f57b03c88
order: remove field 'price'
2025-07-22 13:33:52 +03:00
vchikalkin
6dc36ebe89
refactor: remove service_description field from order schema and TypeScript definitions
2025-07-19 13:46:20 +03:00
Vlad Chikalkin
b0171aa079
Refactor/migrate to datetime ( #2 )
...
* feat: refactor order and slot lifecycles to use datetime fields for time validation
* refactor: remove time fields from order and slot schemas to streamline data structure
* fix: correct time validation logic in order and slot lifecycles to ensure proper datetime comparisons
* fix: update order lifecycle validation to exclude only 'cancelled' state
* fix: add validation to ensure order times fall within the specified slot boundaries
* feat: integrate dayjs for improved datetime handling in order lifecycles
Нельзя завершить запись до её наступления
* fix: enhance datetime validation in order and slot lifecycles to ensure accurate comparisons
* fix: standardize error messages in order and slot lifecycles for better clarity
2025-07-18 17:12:57 +03:00
vchikalkin
07b4239038
fix: update error handling in order lifecycle to check for missing time
2025-07-16 17:12:00 +03:00
vchikalkin
bbb697b159
docker-compose: expose 1337 port for 127.0.0.1
2025-07-13 11:23:39 +03:00
vchikalkin
9f6d5fe11c
fix: correct slot ID condition in order lifecycle validation
2025-07-11 16:28:57 +03:00
vchikalkin
a447f4bf1c
feat: refactor slot lifecycle methods to include master validation and enhance time checks
2025-07-11 16:22:11 +03:00
vchikalkin
2686249cc9
feat: enhance order creation validation with additional checks for client, slot, and service
2025-07-11 13:38:42 +03:00
vchikalkin
4ff50e42b9
fix: update deploy workflow to use dynamic SSH port
2025-07-10 16:27:17 +03:00
vchikalkin
c5d4ef3392
feat: add validation for slot time changes based on order status
2025-07-10 16:19:41 +03:00
vchikalkin
066de8ced8
docker-compose: comment ports
2025-07-02 21:53:37 +03:00
vchikalkin
ddc1f44fa0
Dockerfile: upgrade node.js
Build & Deploy Strapi from Docker Hub / Build and Push to Docker Hub (push) Has been cancelled
Build & Deploy Strapi from Docker Hub / Deploy to VPS (push) Has been cancelled
2025-06-27 23:47:30 +03:00
vchikalkin
e799257dee
finally: working deploy
Build & Deploy Strapi from Docker Hub / Build and Push to Docker Hub (push) Has been cancelled
Build & Deploy Strapi from Docker Hub / Deploy to VPS (push) Has been cancelled
2025-06-27 21:01:43 +03:00
vchikalkin
a4bdfddc54
chore: add production environment to deploy workflow
Build & Deploy Strapi from Docker Hub / Deploy to VPS (push) Has been cancelled
2025-06-27 20:30:49 +03:00
vchikalkin
839f3445c7
refactor deploy workflow: comment out build-and-push job and add .env file creation and SCP steps for environment variables
Build & Deploy Strapi from Docker Hub / Deploy to VPS (push) Has been cancelled
2025-06-27 20:26:16 +03:00
vchikalkin
cb5aaeb412
fix Login and deploy on VPS
Build & Deploy Strapi from Docker Hub / Build and Push to Docker Hub (push) Has been cancelled
Build & Deploy Strapi from Docker Hub / Deploy to VPS (push) Has been cancelled
2025-06-27 20:17:06 +03:00
vchikalkin
c852b95c43
deploy: add SSH checkout and ensure zapishis-strapi directory exists on VPS
Build & Deploy Strapi from Docker Hub / Build and Push to Docker Hub (push) Has been cancelled
Build & Deploy Strapi from Docker Hub / Deploy to VPS (push) Has been cancelled
2025-06-27 20:05:08 +03:00
vchikalkin
879dcc2d62
deploy: fix copy docker-compose.yml to VPS
Build & Deploy Strapi from Docker Hub / Build and Push to Docker Hub (push) Has been cancelled
Build & Deploy Strapi from Docker Hub / Deploy to VPS (push) Has been cancelled
2025-06-27 19:51:25 +03:00
vchikalkin
a22d2ff773
fix: deploy (login & sync file)
Build & Deploy Strapi from Docker Hub / Build and Push to Docker Hub (push) Has been cancelled
Build & Deploy Strapi from Docker Hub / Deploy to VPS (push) Has been cancelled
2025-06-27 19:38:35 +03:00
vchikalkin
7a74fd7c28
deploy: strapi-app -> zapishis-strapi
2025-06-27 19:24:48 +03:00
vchikalkin
ed6da539ce
deploy: use docker hub
Build & Deploy Strapi from Docker Hub / Build and Push to Docker Hub (push) Has been cancelled
Build & Deploy Strapi from Docker Hub / Deploy to VPS (push) Has been cancelled
2025-06-27 19:11:18 +03:00
vchikalkin
3a20dc60b9
fix: deploy db secrets
Deploy Strapi to VPS / deploy (push) Has been cancelled
2025-06-27 18:50:24 +03:00
vchikalkin
2300a7cc1c
deploy: try .env - file pattern
Deploy Strapi to VPS / deploy (push) Has been cancelled
2025-06-27 18:45:30 +03:00
vchikalkin
4686690c33
fix: deploy docker compose permission error
Deploy Strapi to VPS / deploy (push) Has been cancelled
2025-06-27 18:36:33 +03:00
vchikalkin
4a5910611e
fix: specify deploy branch 'master'
Deploy Strapi to VPS / deploy (push) Has been cancelled
2025-06-27 18:32:44 +03:00
vchikalkin
1d50c3168f
add github deploy files
2025-06-27 18:27:03 +03:00
vchikalkin
ed1fe77f62
set order_number if order state changes to completed
2025-06-27 14:42:49 +03:00
vchikalkin
c26ad36781
order: check client & master active before create
2025-06-27 12:35:04 +03:00
vchikalkin
b357571fea
fix prev commit
2025-06-26 14:08:46 +03:00
vchikalkin
c5d4a2f782
fix update order via strapi ui
2025-06-26 13:57:25 +03:00
vchikalkin
2074955d19
order: fix order update state lifecycle
2025-06-25 12:20:14 +03:00
vchikalkin
065da3e275
order: rename cancellation ->cancelling
2025-06-24 12:32:36 +03:00
vchikalkin
af4196c685
order: add state 'cancellation'
2025-06-24 11:35:34 +03:00
vchikalkin
caa9fc54a7
order: fix lifecycle
2025-06-11 17:14:08 +03:00
vchikalkin
9ca79ed336
enable debug
2025-06-11 15:28:58 +03:00
vchikalkin
e419cd811c
packages: upgrade strapi version
2025-06-10 11:24:30 +03:00
vchikalkin
d62b9ad4b0
order: delete date field
2025-06-10 11:19:13 +03:00
vchikalkin
5e54c3f7e3
slot: disable beforeUpdate if no time_start & time_end
2025-05-21 12:24:27 +03:00
vchikalkin
f434f0e208
order: lifecycle checks
2025-05-09 18:48:49 +03:00