feat(customers): enhance customer retrieval with filtering options

- Updated `findAll` method in `CustomersController` to accept filtering parameters.
- Implemented filtering logic in `CustomersService` to retrieve customers based on type and search query.
- Added `PosCustomerFilterDto` for query validation.
- Updated customer-related DTOs to make fields optional and added length validation where necessary.
- Modified customer-related logic in `sales-invoice-tsp.utils.ts` to accommodate new DTO structure.
- Added unique constraints to `customer_individuals` and `customer_legal` tables in the database migration.
- Removed commented-out code in `PosMiddleware` for cleaner codebase.
- Set default value for `is_default_guild_good` to false in `OwnedGoodsService`.
This commit is contained in:
2026-06-03 18:00:06 +03:30
parent b2d8fdc8a0
commit 5ce560ce97
19 changed files with 946 additions and 613 deletions
+52
View File
@@ -128,3 +128,55 @@ Typecheck before handoff:
```bash
pnpm -s tsc --noEmit
```
# INVESTIGATION LIMITS
For localized fixes:
- maximum 3 file reads before first edit
- maximum 1 related-file read unless required
- maximum 5 total file reads before implementation
Stop searching once the target service, controller, DTO, schema, or repository method is identified.
# TARGETED READ RULES
Do not read files larger than 300 lines unless required.
For known symbols:
1. rtk grep
2. rtk smart
3. read only the relevant section
Avoid opening entire services, modules, or controllers for localized changes.
Prefer symbol-level inspection.
# REVIEW MODE
During reviews:
- inspect changed files only
- avoid repository-wide searches
- avoid architecture exploration
- avoid reading unrelated modules
Review only code affected by the diff.
# HARD TOKEN LIMITS
For localized fixes:
- Never read more than 5 files before the first edit.
- Never read a file larger than 300 lines unless the target symbol cannot be isolated.
- Never open an entire service, controller, or module when a symbol-level read is possible.
- Never reread a file already summarized by `rtk smart` unless implementation details are required.
When a file exceeds 300 lines:
1. rtk grep
2. rtk smart
3. read only the required section
Avoid full-file reads.