-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes to accept update for update request
- Loading branch information
1 parent
6d084ab
commit f836c0e
Showing
12 changed files
with
203 additions
and
12 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
submit-api/migrations/versions/f9cdde365d29_add_accepted_status_to_.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
"""add_accepted_status_to_updaterequeststatus | ||
Revision ID: f9cdde365d29 | ||
Revises: 2a8e579da45c | ||
Create Date: 2025-02-19 16:58:23.507357 | ||
""" | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'f9cdde365d29' | ||
down_revision = '2a8e579da45c' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.execute("ALTER TYPE updaterequeststatus ADD VALUE 'ACCEPTED'") | ||
|
||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
pass | ||
|
||
# ### end Alembic commands ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
submit-web/src/components/UpdateRequestStatusChip/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { Chip } from "@mui/material"; | ||
import { BCDesignTokens } from "epic.theme"; | ||
|
||
type StyleProps = { | ||
sx: Record<string, string | number>; | ||
label: string; | ||
}; | ||
|
||
const statusStyles: Record<string, StyleProps> = { | ||
ACCEPTED: { | ||
label: "Accepted", | ||
sx: { | ||
borderRadius: 1, | ||
border: `1px solid ${BCDesignTokens.supportBorderColorSuccess}`, | ||
background: BCDesignTokens.supportSurfaceColorSuccess, | ||
height: "24px", | ||
width: "83px", | ||
}, | ||
}, | ||
}; | ||
|
||
type UpdateRequestStatusChipProps = Readonly<{ | ||
status?: string; | ||
}>; | ||
export function UpdateRequestStatusChip({ | ||
status = "", | ||
}: UpdateRequestStatusChipProps) { | ||
const style = statusStyles[status]; | ||
|
||
if (!style) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<Chip | ||
sx={{ | ||
...style.sx, | ||
}} | ||
label={style.label} | ||
/> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters