Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Production release #2586

Merged
merged 9 commits into from
Sep 7, 2023
42 changes: 42 additions & 0 deletions .github/workflows/deploy_staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: 'Staging deployment'
on: [workflow_dispatch]
jobs:
deploy_staging:
if: github.ref == 'refs/heads/staging'
runs-on: ubuntu-latest
strategy:
max-parallel: 1
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.7
- uses: actions/setup-node@v2-beta
with:
node-version: '16'
- name: 'Deploy staging'
env:
name: staging
url: 'https://staging.queens-awards-enterprise.service.gov.uk/'
CF_ENDPOINT: 'api.london.cloud.service.gov.uk'
CF_SPACE: staging
CF_APP: qae-staging
CF_USER: ${{ secrets.CF_USER }}
CF_PASSWORD: ${{ secrets.CF_PASSWORD }}
CF_ORG: ${{ secrets.CF_ORG }}
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
run: |
curl -v -L -o cf-cli_amd64.deb 'https://cli.run.pivotal.io/stable?release=debian64&source=github'
sudo dpkg -i cf-cli_amd64.deb
cf -v
cf add-plugin-repo CF-Community https://plugins.cloudfoundry.org
cf install-plugin blue-green-deploy -r CF-Community -f
./bin/deploy
4 changes: 4 additions & 0 deletions app/assets/javascripts/application.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,12 @@ jQuery ->
referenceValue = parseFloat(referenceCell?.value) or 0
if type == 'disadvantaged'
proportionInput?.value = ((referenceValue / colSums[cell.cellIndex]) * 100).toFixed(2)

else if type == 'others'
proportionInput?.value = ( colSums[cell.cellIndex] / (colSums[cell.cellIndex] + referenceValue) * 100).toFixed(2)

if isNaN(parseFloat(proportionInput?.value))
proportionInput?.value = "0"

calculateRowsToExcludeFromBottom = (table, className) ->
rows = table.querySelectorAll('tr');
Expand Down
10 changes: 6 additions & 4 deletions app/views/qae_form/_queen_award_applications_question.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ a.govuk-button.govuk-button--secondary.js-button-add.if-no-js-hide href="#" aria

.question-block.help-block
.govuk-form-group
p class="govuk-body govuk-!-font-weight-bold hide" id="current-holder"
| As you currently hold a King's Award for International Trade, you cannot apply for another Award. You may apply in future years but can only use one year's financial performance from your Award winning application.
p class="govuk-body govuk-!-font-weight-bold hide" id="recent-winner"
| As you currently hold a King's Award in International Trade, you can only apply for the Outstanding Achievement Award (3 years).
- if @form_answer.trade?
p[class="govuk-body govuk-!-font-weight-bold hide" id="current-holder"]
| As you currently hold a King's Award for International Trade, you cannot apply for another Award. You may apply in future years but can only use one year's financial performance from your Award winning application.

p[class="govuk-body govuk-!-font-weight-bold hide" id="recent-winner"]
| As you currently hold a King's Award in International Trade, you can only apply for the Outstanding Achievement Award (3 years).
Loading
Loading