Put the user's role and branch on GET /profile, upsert role_user and branch_user on POST, and drop their list endpoints.
Also accept flexible card-order form values, move mock seed under db/mock, and regenerate Swagger. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
7225dc0399
commit
8795ae2195
47 files changed
+1308
-1785
No files matched your search
@@ -0,0 +1,54 @@
|
||||
-- Additive seed for card issuance reasons from the admin "Kartyň çykarylmagynyň sebäpleri" list.
|
||||
-- Does not truncate users or other tables. Safe to re-run (skips existing tm names).
|
||||
-- Usage:
|
||||
-- PGPASSWORD='bank@#23#@_password' psql -h localhost -p 5424 -U bank_admin -d bank_db -f db/mock/seed_card_states.sql
|
||||
|
||||
INSERT INTO card_states (name, price, notes, active)
|
||||
SELECT name, price, notes, active
|
||||
FROM (VALUES
|
||||
(
|
||||
'{"en":"New","ru":"Новая","tm":"Täze"}'::json,
|
||||
'32',
|
||||
'',
|
||||
true
|
||||
),
|
||||
(
|
||||
'{"en":"Broken / damaged","ru":"Сломанная / повреждённая","tm":"Döwülen/Zaýalanan"}'::json,
|
||||
'32',
|
||||
'',
|
||||
true
|
||||
),
|
||||
(
|
||||
'{"en":"Usage period expired","ru":"Истёк срок использования","tm":"Ulanylyş möhleti geçen"}'::json,
|
||||
'32',
|
||||
'',
|
||||
true
|
||||
),
|
||||
(
|
||||
'{"en":"Surname change","ru":"Смена фамилии","tm":"Familiýasy üýtgeýär"}'::json,
|
||||
'32',
|
||||
'',
|
||||
true
|
||||
),
|
||||
(
|
||||
'{"en":"Lost","ru":"Утеряна","tm":"Ýiten"}'::json,
|
||||
'37.75',
|
||||
'',
|
||||
true
|
||||
),
|
||||
(
|
||||
'{"en":"PIN envelope (blocked)","ru":"PIN-конверт (заблокирован)","tm":"Pin bukja (bloklanan)"}'::json,
|
||||
'3.02',
|
||||
'',
|
||||
false
|
||||
),
|
||||
(
|
||||
'{"en":"Requisites","ru":"Реквизиты","tm":"Rekwizit"}'::json,
|
||||
'2.30',
|
||||
'',
|
||||
false
|
||||
)
|
||||
) AS t(name, price, notes, active)
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM card_states cs WHERE cs.name->>'tm' = t.name->>'tm'
|
||||
);
|
||||
Reference in new issue
Block a user