Skip to content

Commit 29dd109

Browse files
committed
Documentation cleanup for substrate v2
README.md: - Drop the 'real-time page updates for Number Tags Webpage' qualifier on Turbo - Rename 'Number Tags (ItemTags)' to 'Item Tags' in the features list CLAUDE.md: - Correct the ItemTag description: name has no uniqueness constraint; describe the columns (name/description/position) and binary state instead docs/openapi.yaml (-90/+31): - ItemTag schema: drop queue_number/scan_state/customer_read_at/already_completed, add name (required)/description/position - Shop schema: drop scanned_item_tags_count and display_shop_server_path - /permissions meta: drop maximum_queue_number_length - Roles: drop senior_manager/junior_manager/senior_member/junior_member/guest, add member (5 sites: AccountsShopkeeper attrs/update, AccountsInvitation attrs/create/update) - Endpoints: remove DELETE /shops/{shopId}/reset; rename PATCH /item_tags/{itemTagId}/reset → /idle (resetItemTag → idleItemTag) - ItemTag create/update request bodies switched to name+description+position+state Also delete: - docs/pagination-item-tags.md (pre-implementation notes; pagy is now wired in the controller, doc is stale) - app/views/layouts/display.html.erb (orphaned after Step 3 display namespace removal — no controllers reference this layout)
1 parent 27d462a commit 29dd109

5 files changed

Lines changed: 34 additions & 287 deletions

File tree

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ bin/rails dbconsole # Database console
7070
- `Account` - Top-level tenant/organization
7171
- `Shopkeeper` - Main user type (belongs to Account)
7272
- `Shop` - Core business entity (belongs to Account)
73-
- `ItemTag` - Belongs to Shop with unique name constraint
73+
- `ItemTag` - Belongs to Shop; has name/description/position and a binary state (idled/completed)
7474
- `Role` & `Permission` - Authorization system
7575
- State machines implemented with AASM gem
7676

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ For more information, visit [nativeapptemplate.com](https://nativeapptemplate.co
2222
- **[pundit](https://github.com/varvet/pundit)**
2323
- **[acts_as_tenant](https://github.com/ErwinM/acts_as_tenant)**
2424
- **[pagy](https://github.com/ddnexus/pagy)**
25-
- **[Turbo](https://turbo.hotwired.dev/)** (real-time page updates for Number Tags Webpage)
25+
- **[Turbo](https://turbo.hotwired.dev/)**
2626
- **Test** (Minitest)
2727

2828
### Included Features
@@ -31,7 +31,7 @@ For more information, visit [nativeapptemplate.com](https://nativeapptemplate.co
3131
- Email Confirmation
3232
- Forgot Password
3333
- CRUD Operations for Shops (Create/Read/Update/Delete)
34-
- CRUD Operations for Shops' Nested Resource, Number Tags (ItemTags) (Create/Read/Update/Delete)
34+
- CRUD Operations for Shops' Nested Resource, Item Tags (Create/Read/Update/Delete)
3535
- URL Path-Based Multitenancy (prepends `/:account_id/` to URLs)
3636
- User Invitation to Organizations
3737
- Role-Based Permissions and Access Control

app/views/layouts/display.html.erb

Lines changed: 0 additions & 33 deletions
This file was deleted.

docs/openapi.yaml

Lines changed: 31 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,8 @@ components:
4545
type: string
4646
item_tags_count:
4747
type: integer
48-
scanned_item_tags_count:
49-
type: integer
5048
completed_item_tags_count:
5149
type: integer
52-
display_shop_server_path:
53-
type: string
5450

5551
Shop:
5652
type: object
@@ -85,22 +81,18 @@ components:
8581
shop_id:
8682
type: string
8783
format: uuid
88-
queue_number:
84+
name:
8985
type: string
86+
description:
87+
type: ['string', 'null']
88+
position:
89+
type: ['integer', 'null']
9090
state:
9191
type: string
9292
enum: [idled, completed]
93-
scan_state:
94-
type: string
95-
enum: [unscanned, scanned]
96-
customer_read_at:
97-
type: ['string', 'null']
98-
format: date-time
9993
completed_at:
10094
type: ['string', 'null']
10195
format: date-time
102-
already_completed:
103-
type: boolean
10496
created_at:
10597
type: string
10698
format: date-time
@@ -249,15 +241,7 @@ components:
249241
format: uuid
250242
admin:
251243
type: boolean
252-
senior_manager:
253-
type: boolean
254-
junior_manager:
255-
type: boolean
256-
senior_member:
257-
type: boolean
258-
junior_member:
259-
type: boolean
260-
guest:
244+
member:
261245
type: boolean
262246

263247
AccountsShopkeeper:
@@ -317,15 +301,7 @@ components:
317301
format: email
318302
admin:
319303
type: boolean
320-
senior_manager:
321-
type: boolean
322-
junior_manager:
323-
type: boolean
324-
senior_member:
325-
type: boolean
326-
junior_member:
327-
type: boolean
328-
guest:
304+
member:
329305
type: boolean
330306

331307
AccountsInvitation:
@@ -465,10 +441,17 @@ components:
465441
properties:
466442
item_tag:
467443
type: object
468-
required: [queue_number]
444+
required: [name]
469445
properties:
470-
queue_number:
446+
name:
447+
type: string
448+
description:
449+
type: string
450+
position:
451+
type: integer
452+
state:
471453
type: string
454+
enum: [idled, completed]
472455

473456
ItemTagUpdateRequest:
474457
type: object
@@ -477,8 +460,15 @@ components:
477460
item_tag:
478461
type: object
479462
properties:
480-
queue_number:
463+
name:
464+
type: string
465+
description:
466+
type: string
467+
position:
468+
type: integer
469+
state:
481470
type: string
471+
enum: [idled, completed]
482472

483473
AccountCreateRequest:
484474
type: object
@@ -510,15 +500,7 @@ components:
510500
properties:
511501
admin:
512502
type: boolean
513-
senior_manager:
514-
type: boolean
515-
junior_manager:
516-
type: boolean
517-
senior_member:
518-
type: boolean
519-
junior_member:
520-
type: boolean
521-
guest:
503+
member:
522504
type: boolean
523505

524506
AccountsInvitationCreateRequest:
@@ -536,15 +518,7 @@ components:
536518
format: email
537519
admin:
538520
type: boolean
539-
senior_manager:
540-
type: boolean
541-
junior_manager:
542-
type: boolean
543-
senior_member:
544-
type: boolean
545-
junior_member:
546-
type: boolean
547-
guest:
521+
member:
548522
type: boolean
549523

550524
AccountsInvitationUpdateRequest:
@@ -558,15 +532,7 @@ components:
558532
type: string
559533
admin:
560534
type: boolean
561-
senior_manager:
562-
type: boolean
563-
junior_manager:
564-
type: boolean
565-
senior_member:
566-
type: boolean
567-
junior_member:
568-
type: boolean
569-
guest:
535+
member:
570536
type: boolean
571537

572538
SignUpRequest:
@@ -1054,8 +1020,6 @@ paths:
10541020
type: boolean
10551021
should_update_terms:
10561022
type: boolean
1057-
maximum_queue_number_length:
1058-
type: integer
10591023
shop_limit_count:
10601024
type: integer
10611025
account_limit_count:
@@ -1238,29 +1202,6 @@ paths:
12381202
'401':
12391203
$ref: '#/components/responses/Unauthorized'
12401204

1241-
/shops/{shopId}/reset:
1242-
parameters:
1243-
- name: shopId
1244-
in: path
1245-
required: true
1246-
schema:
1247-
type: string
1248-
format: uuid
1249-
1250-
delete:
1251-
operationId: resetShop
1252-
summary: Reset all item tags in a shop
1253-
tags: [Shops]
1254-
responses:
1255-
'200':
1256-
description: Shop reset
1257-
content:
1258-
application/json:
1259-
schema:
1260-
$ref: '#/components/schemas/SuccessResponse'
1261-
'401':
1262-
$ref: '#/components/responses/Unauthorized'
1263-
12641205
# ──────────────── Item Tags ────────────────
12651206
/shops/{shopId}/item_tags:
12661207
parameters:
@@ -1441,7 +1382,7 @@ paths:
14411382
'404':
14421383
$ref: '#/components/responses/NotFound'
14431384

1444-
/item_tags/{itemTagId}/reset:
1385+
/item_tags/{itemTagId}/idle:
14451386
parameters:
14461387
- name: itemTagId
14471388
in: path
@@ -1451,12 +1392,12 @@ paths:
14511392
format: uuid
14521393

14531394
patch:
1454-
operationId: resetItemTag
1455-
summary: Reset an item tag to initial state
1395+
operationId: idleItemTag
1396+
summary: Reset an item tag to idled state
14561397
tags: [Item Tags]
14571398
responses:
14581399
'200':
1459-
description: Item tag reset
1400+
description: Item tag idled
14601401
content:
14611402
application/json:
14621403
schema:

0 commit comments

Comments
 (0)