diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 96f5342f1..36d8669b4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -89,34 +89,34 @@ jobs: with: image: ghcr.io/podkrepi-bg/frontend:${{ env.VERSION }} - scan-manifests: - name: Scan k8s manifests - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Install kustomize - uses: imranismail/setup-kustomize@v2 - - - name: Build development manifests - run: kustomize build manifests/overlays/development > dev-manifests.yaml - - - name: Scan development manifests with Mondoo - uses: mondoohq/actions/k8s-manifest@main - env: - MONDOO_CONFIG_BASE64: ${{ secrets.MONDOO_SECRET }} - with: - path: dev-manifests.yaml - - - name: Build production manifests - run: kustomize build manifests/overlays/production > prod-manifests.yaml - - - name: Scan production manifests with Mondoo - uses: mondoohq/actions/k8s-manifest@main - env: - MONDOO_CONFIG_BASE64: ${{ secrets.MONDOO_SECRET }} - with: - path: prod-manifests.yaml +# scan-manifests: +# name: Scan k8s manifests +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# +# - name: Install kustomize +# uses: imranismail/setup-kustomize@v2 +# +# - name: Build development manifests +# run: kustomize build manifests/overlays/development > dev-manifests.yaml +# +# - name: Scan development manifests with Mondoo +# uses: mondoohq/actions/k8s-manifest@main +# env: +# MONDOO_CONFIG_BASE64: ${{ secrets.MONDOO_SECRET }} +# with: +# path: dev-manifests.yaml +# +# - name: Build production manifests +# run: kustomize build manifests/overlays/production > prod-manifests.yaml +# +# - name: Scan production manifests with Mondoo +# uses: mondoohq/actions/k8s-manifest@main +# env: +# MONDOO_CONFIG_BASE64: ${{ secrets.MONDOO_SECRET }} +# with: +# path: prod-manifests.yaml run-playwright: name: Run Playwright @@ -126,7 +126,7 @@ jobs: release-dev: name: Release to dev runs-on: ubuntu-latest - needs: [build-frontend-image, build-maintenance-image, scan-manifests, run-playwright] + needs: [build-frontend-image, build-maintenance-image, run-playwright] environment: name: dev url: https://dev.podkrepi.bg diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 63e16d5ba..ad13277f2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -71,36 +71,36 @@ jobs: with: image: ghcr.io/podkrepi-bg/maintenance:pr - scan-manifests: - name: Scan k8s manifests - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - - - name: Install kustomize - uses: imranismail/setup-kustomize@v2 - - - name: Build development manifests - run: kustomize build manifests/overlays/development > dev-manifests.yaml - - - name: Scan development manifests with Mondoo - uses: mondoohq/actions/k8s-manifest@main - env: - MONDOO_CONFIG_BASE64: ${{ secrets.MONDOO_SECRET }} - with: - path: dev-manifests.yaml - - - name: Build production manifests - run: kustomize build manifests/overlays/production > prod-manifests.yaml - - - name: Scan production manifests with Mondoo - uses: mondoohq/actions/k8s-manifest@main - env: - MONDOO_CONFIG_BASE64: ${{ secrets.MONDOO_SECRET }} - with: - path: prod-manifests.yaml +# scan-manifests: +# name: Scan k8s manifests +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# with: +# ref: ${{ github.event.pull_request.head.sha }} +# +# - name: Install kustomize +# uses: imranismail/setup-kustomize@v2 +# +# - name: Build development manifests +# run: kustomize build manifests/overlays/development > dev-manifests.yaml +# +# - name: Scan development manifests with Mondoo +# uses: mondoohq/actions/k8s-manifest@main +# env: +# MONDOO_CONFIG_BASE64: ${{ secrets.MONDOO_SECRET }} +# with: +# path: dev-manifests.yaml +# +# - name: Build production manifests +# run: kustomize build manifests/overlays/production > prod-manifests.yaml +# +# - name: Scan production manifests with Mondoo +# uses: mondoohq/actions/k8s-manifest@main +# env: +# MONDOO_CONFIG_BASE64: ${{ secrets.MONDOO_SECRET }} +# with: +# path: prod-manifests.yaml run-playwright: name: Run Playwright diff --git a/src/components/client/campaigns/CampaignCard/CampaignCard.tsx b/src/components/client/campaigns/CampaignCard/CampaignCard.tsx index d99672f4f..cf1ab0d60 100644 --- a/src/components/client/campaigns/CampaignCard/CampaignCard.tsx +++ b/src/components/client/campaigns/CampaignCard/CampaignCard.tsx @@ -40,7 +40,7 @@ export default function ActiveCampaignCard({ campaign, index }: Props) { const campaignImagesUrl = campaignListPictureUrl(campaign) - const reached = summary ? summary.reachedAmount + summary.guaranteedAmount : 0 + const reached = summary ? summary.reachedAmount + (summary.guaranteedAmount ?? 0) : 0 const reachedAmount = moneyPublic(reached) const targetAmount = moneyPublic(campaign.targetAmount) const percentage = (reached / target) * 100 diff --git a/src/components/client/campaigns/CampaignDetails.tsx b/src/components/client/campaigns/CampaignDetails.tsx index 2e09c036f..1fbb04e07 100644 --- a/src/components/client/campaigns/CampaignDetails.tsx +++ b/src/components/client/campaigns/CampaignDetails.tsx @@ -248,7 +248,7 @@ type CampaignFinanceProps = Props & { expenses: number } const CampaignFinanceSummary = ({ campaign, expenses }: CampaignFinanceProps) => { - const total = campaign.summary.guaranteedAmount + campaign.summary.reachedAmount + const total = (campaign.summary.guaranteedAmount ?? 0) + campaign.summary.reachedAmount const transferred = campaign.summary.blockedAmount + campaign.summary.withdrawnAmount return ( @@ -264,7 +264,7 @@ const CampaignFinanceSummary = ({ campaign, expenses }: CampaignFinanceProps) => - Гарантирани: {moneyPublic(campaign.summary.guaranteedAmount)} + Гарантирани: {moneyPublic(campaign.summary.guaranteedAmount ?? 0)} { const { t } = useTranslation() const [loading, setLoading] = useState(false) const [open, setOpen] = useState(false) - const [email, setEmail] = useState(''); + const [email, setEmail] = useState('') async function onSubmit(values: { email: string }) { setLoading(true) diff --git a/src/components/client/notifications/CampaignSubscribeModal.tsx b/src/components/client/notifications/CampaignSubscribeModal.tsx index 335ec4dc8..b89863c6d 100644 --- a/src/components/client/notifications/CampaignSubscribeModal.tsx +++ b/src/components/client/notifications/CampaignSubscribeModal.tsx @@ -59,8 +59,8 @@ export default function RenderCampaignSubscribeModal({ campaign, setOpen }: Moda const [loading, setLoading] = useState(false) const [isSuccess, setIsSuccess] = useState(false) const [isGuest, setIsGuest] = useState(false) - const [email, setEmail] = useState(''); - const [consent, setConsent] = useState(false); + const [email, setEmail] = useState('') + const [consent, setConsent] = useState(false) const router = useRouter() const handleError = (e: AxiosError) => { diff --git a/src/components/client/notifications/GeneralSubscribeModal.tsx b/src/components/client/notifications/GeneralSubscribeModal.tsx index 203128b4a..91fa656f8 100644 --- a/src/components/client/notifications/GeneralSubscribeModal.tsx +++ b/src/components/client/notifications/GeneralSubscribeModal.tsx @@ -67,7 +67,7 @@ export default function RenderSubscribeModal({ setOpen }: ModalProps) { const [loading, setLoading] = useState(false) const [isSuccess, setIsSuccess] = useState(false) const [isGuest, setIsGuest] = useState(false) - const [email, setEmail] = useState(''); + const [email, setEmail] = useState('') const router = useRouter() const handleError = (e: AxiosError) => {