Skip to content

Commit

Permalink
cherrypick changes from ty/1254/upload-documents
Browse files Browse the repository at this point in the history
  • Loading branch information
horatiorosa committed Jan 8, 2025
1 parent 247514f commit bf0b314
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
- uses: actions/checkout@v4
with:
sparse-checkout: server
- name: 'Install Heroku CLI'
run: curl https://cli-assets.heroku.com/install.sh | sh
- uses: akhileshns/[email protected]
name: Deploy server to Heroku
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ jobs:
with:
ref: 'main'
sparse-checkout: server
- name: 'Install Heroku CLI'
run: curl https://cli-assets.heroku.com/install.sh | sh
- uses: akhileshns/[email protected]
name: Deploy server to Heroku
with:
Expand Down
24 changes: 15 additions & 9 deletions client/app/components/projects/new.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,23 @@
<saveableProjectsNewForm.SubmitButton @isEnabled={{saveableProjectsNewForm.isSubmittable}} data-test-save-button />
</saveableProjectsNewForm.PageNav>
<Messages::Assistance class="large-margin-top" />
<saveableProjectsNewForm.ConfirmationModal @action={{component saveableProjectsNewForm.SubmitButton
isEnabled=saveableProjectsNewForm.isSubmittable onClick=this.submitProject class="no-margin" }}
<saveableProjectsNewForm.ConfirmationModal @action={{component saveableProjectsNewForm.SubmitButton onClick=this.submitProject class="no-margin" }}
disabled={{or (not saveableProjectsNewForm.isSubmittable) this.submissionError}}
@continueButtonTitle="Continue Editing" data-test-confirm-submit-button={{true}}>
<h6>Confirm New Project Submission</h6>
<p class="header-large medium-margin-top small-margin-bottom">
Are you sure?
</p>
<p>
Before submitting, ensure that your answers are accurate and complete, and that necessary attachments have been uploaded. If NYC Planning does not receive enough accurate information to provide guidance, the Lead Planner will notify you and request that this form be resubmitted with necessary materials, corrections, or
clarifications.
</p>
{{#if this.submissionError}}
<p class="header-large medium-marin-top small-margin-bottom">Error while creating project. Lorem Ipsum.....</p>
{{else}}
<p class="header-large medium-margin-top small-margin-bottom">
Are you sure?
</p>
<p>
Before submitting, ensure that your answers are accurate and complete, and that necessary attachments have been
uploaded. If NYC Planning does not receive enough accurate information to provide guidance, the Lead Planner will
notify you and request that this form be resubmitted with necessary materials, corrections, or
clarifications.
</p>
{{/if}}
</saveableProjectsNewForm.ConfirmationModal>
</div>
</div>
Expand Down
5 changes: 5 additions & 0 deletions client/app/components/projects/new.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Component from '@glimmer/component';
import { action } from '@ember/object';
import { tracked } from '@glimmer/tracking';
import { inject as service } from '@ember/service';
import SubmittableProjectsNewForm from '../../validations/submittable-projects-new-form';
import { optionset } from '../../helpers/optionset';
Expand All @@ -11,8 +12,11 @@ export default class ProjectsNewFormComponent extends Component {
SubmittableProjectsNewForm,
};

@tracked submissionError = false;

requestCounter = 0;


@service
router;

Expand Down Expand Up @@ -134,6 +138,7 @@ export default class ProjectsNewFormComponent extends Component {

this.router.transitionTo('projects');
} catch {
this.submissionError = true;
/* eslint-disable-next-line no-console */
console.error('Error while creating project');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,4 @@
The size limit for each file is 50 MB. You can upload up to 1 GB of files.
</p>
</fieldset>
</div>
</div>
8 changes: 7 additions & 1 deletion server/src/projects/projects.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ import { ArtifactService } from '../artifacts/artifacts.service';
import { SharepointModule } from '../sharepoint/sharepoint.module';

@Module({
imports: [CrmModule, SharepointModule, ConfigModule, ContactModule, AuthModule],
imports: [
CrmModule,
SharepointModule,
ConfigModule,
ContactModule,
AuthModule
],
providers: [ProjectsService, ArtifactService],
exports: [ProjectsService],
controllers: [ProjectsController, ProjectApplicantController],
Expand Down

0 comments on commit bf0b314

Please sign in to comment.