Skip to content

Commit

Permalink
fix: Display order of values, add none
Browse files Browse the repository at this point in the history
  • Loading branch information
afwilcox committed Sep 27, 2024
1 parent ec3f394 commit 6091b41
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ export class ScheduleSectorXrefService {
},
active_ind: true,
},
orderBy: [
{
sector_code_schedule_sector_xref_sector_codeTosector_code: {
display_order: "asc",
},
},
],
});

return codes.map(
Expand Down
54 changes: 53 additions & 1 deletion migrations/sql/R__code-table-data.sql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4045,7 +4045,8 @@ where

update case_management.sector_code
set
long_description = 'Meat by-product processing industry'
long_description = 'Meat by-product processing industry',
display_order = 340
where
sector_code = 'MEATBYPROD';

Expand Down Expand Up @@ -4542,6 +4543,57 @@ where sector_code IN
'VENDGENLAN'
);

--
-- Add Other/None as a schedule/sector code
-- INSERT sector_code value
--
INSERT INTO
case_management.sector_code (
sector_code,
short_description,
long_description,
display_order,
active_ind,
create_user_id,
create_utc_timestamp,
update_user_id,
update_utc_timestamp
)
VALUES
(
'NONE',
'None',
'None',
1030,
'Y',
CURRENT_USER,
CURRENT_TIMESTAMP,
CURRENT_USER,
CURRENT_TIMESTAMP
) ON CONFLICT
DO NOTHING;
INSERT INTO
case_management.schedule_sector_xref (
schedule_sector_xref_guid,
schedule_code,
sector_code,
active_ind,
create_user_id,
create_utc_timestamp,
update_user_id,
update_utc_timestamp
)
VALUES
(
uuid_generate_v4 (),
'OTHER',
'NONE',
'Y',
CURRENT_USER,
CURRENT_TIMESTAMP,
CURRENT_USER,
CURRENT_TIMESTAMP
) ON CONFLICT DO NOTHING;


--------------------------
Expand Down

0 comments on commit 6091b41

Please sign in to comment.