Skip to content

Commit 65d9a7e

Browse files
committed
deploy branch, fix sorting script
1 parent 6122446 commit 65d9a7e

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ workflows:
149149
context : org-global
150150
filters:
151151
branches:
152-
only: ['develop', 'migration-setup', 'pm-1510']
152+
only: ['develop', 'migration-setup', 'PM-1314']
153153
- deployProd:
154154
context : org-global
155155
filters:

src/routes/copilotOpportunity/list.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,15 @@ module.exports = [
3535
},
3636
],
3737
order: [
38-
[models.Sequelize.literal(`CASE WHEN "CopilotOpportunity"."status" = 'active' THEN 0 ELSE 1 END`), 'ASC'],
39-
[sortParams[0], sortParams[1]]
38+
[models.Sequelize.literal(`
39+
CASE
40+
WHEN "CopilotOpportunity"."status" = 'active' THEN 0
41+
WHEN "CopilotOpportunity"."status" = 'cancelled' THEN 1
42+
WHEN "CopilotOpportunity"."status" = 'completed' THEN 2
43+
ELSE 3
44+
END
45+
`), 'ASC'],
46+
[sortParams[0], sortParams[1]],
4047
],
4148
limit,
4249
offset,

0 commit comments

Comments
 (0)