Skip to content

Commit

Permalink
UIREC-291 Provide actions for pieces in the rest statuses
Browse files Browse the repository at this point in the history
  • Loading branch information
usavkov-epam committed Jan 4, 2024
1 parent cc80015 commit 1b02c3a
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/TitleDetails/AddPieceModal/ModalActionButtons/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,20 @@ export const PIECE_ACTION_NAMES = {
delete: 'delete',
};

export const EXPECTED_PIECES_ACTIONS = [
PIECE_ACTION_NAMES.saveAndCreate,
PIECE_ACTION_NAMES.quickReceive,
PIECE_ACTION_NAMES.sendClaim,
PIECE_ACTION_NAMES.delayClaim,
PIECE_ACTION_NAMES.unReceivable,
PIECE_ACTION_NAMES.delete,
];

export const PIECE_ACTIONS_BY_STATUS = {
[PIECE_STATUS.expected]: [
PIECE_ACTION_NAMES.saveAndCreate,
PIECE_ACTION_NAMES.quickReceive,
PIECE_ACTION_NAMES.sendClaim,
PIECE_ACTION_NAMES.delayClaim,
PIECE_ACTION_NAMES.unReceivable,
PIECE_ACTION_NAMES.delete,
],
[PIECE_STATUS.expected]: EXPECTED_PIECES_ACTIONS,
[PIECE_STATUS.claimDelayed]: EXPECTED_PIECES_ACTIONS,
[PIECE_STATUS.claimSent]: EXPECTED_PIECES_ACTIONS,
[PIECE_STATUS.late]: EXPECTED_PIECES_ACTIONS,
[PIECE_STATUS.received]: [
PIECE_ACTION_NAMES.saveAndCreate,
PIECE_ACTION_NAMES.unReceive,
Expand Down

0 comments on commit 1b02c3a

Please sign in to comment.