Skip to content

Commit

Permalink
Dev -> sb (#3002)
Browse files Browse the repository at this point in the history
* chore: update workflow to run on demand (#3000)

* chore: update workflow to run on demand

* fix: indentation issues in the workflow

* fix(*): fixed backoffice state for directors with no documents (#3001)

---------

Co-authored-by: pratapalakshmi <[email protected]>
  • Loading branch information
Omri-Levy and pratapalakshmi authored Jan 29, 2025
1 parent d6f7267 commit b6e244c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/packer-build-ami.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Packer build AWS AMI's
on:
workflow_dispatch:
branches:
- prod

jobs:
plan:
Expand All @@ -16,14 +14,14 @@ jobs:
- name: Checkout to Git
uses: actions/checkout@v2

- name: Assume Role
uses: ./
env:
ROLE_ARN: ${{ secrets.AWS_PACKER_ROLE }}
ROLE_SESSION_NAME: packersession
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
DURATION_SECONDS: 900
- name: Assume Role
uses: ./
env:
ROLE_ARN: ${{ secrets.AWS_PACKER_ROLE }}
ROLE_SESSION_NAME: packersession
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
DURATION_SECONDS: 900

- name: Setup `packer`
uses: hashicorp/setup-packer@main
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ export const useDirectorBlock = ({

const blocks = useMemo(() => {
const { documents } = director;
const documentsWithoutImageUrl = documents.map(document => ({
const documentsWithoutImageUrl = documents?.map(document => ({
...document,
pages: document?.pages?.map(({ imageUrl: _imageUrl, ...page }) => page),
}));
const isDocumentRevision = documents.some(
const isDocumentRevision = documents?.some(
document => document?.decision?.status === 'revision',
);
const multiDocumentsBlocks = documents.flatMap(document => {
const multiDocumentsBlocks = documents?.flatMap(document => {
const isDoneWithRevision = document?.decision?.status === 'revised';
const additionalProperties = composePickableCategoryType(
document.category,
Expand Down Expand Up @@ -438,7 +438,7 @@ export const useDirectorBlock = ({
.buildFlat(),
})
.build()
.concat(multiDocumentsBlocks)
.concat(multiDocumentsBlocks ?? [])
.concat(amlBlockWithSeparator)
.flat(1),
className: ctw({
Expand Down
2 changes: 1 addition & 1 deletion services/workflows-service/prisma/data-migrations

0 comments on commit b6e244c

Please sign in to comment.