Skip to content

Commit

Permalink
the validations are valid
Browse files Browse the repository at this point in the history
  • Loading branch information
horatiorosa committed Oct 1, 2024
1 parent bc9fa2a commit fb92738
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
1 change: 1 addition & 0 deletions client/app/components/packages/pas-form/edit.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
@validators={{array this.validations.SaveablePasFormValidations this.validations.SubmittablePasFormValidations}}
as |saveablePasForm|
>
{{!-- template-lint-disable no-log --}}
{{log 'saveablePackageForm.data' saveablePackageForm.data}}
<div class="grid-x grid-margin-x">
<div class="cell large-8">
Expand Down
17 changes: 9 additions & 8 deletions client/app/components/packages/projects/new.hbs
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
<SaveableForm
@model={{@package}}
@validators={{array (hash) this.validations.SubmittableProjectForm this.validations.SaveableProjectForm}}
as |saveablePackageForm|
as |saveableProjectForm|
>
<saveablePackageForm.SaveableForm
@model={{saveablePackageForm.data}}
<saveableProjectForm.SaveableForm
@model={{saveableProjectForm.data}}
@validators={{array (hash) this.validations.SaveableProjectForm this.validations.SubmittableProjectForm}}
as |saveableForm|>
{{log 'saveablePackageForm.data' saveablePackageForm.data}}
{{!-- template-lint-disable no-log --}}
{{log 'saveableProjectForm.data' saveableProjectForm.data}}
<div class="grid-x grid-margin-x">
<div class="cell large-8">
<section class="form-section">
<h1 class="header-large">
Project Initiation Form
</h1>
<p>
1. Display instructional text at the top of the form: The <b>Project Initiation Form</b> begins the project tracking process and gives NYC Planning the necessary details before the Informational Interest meeting. By submitting this form, you confirm your intent to file a Land Use Application with NYC Planning.
The <b>Project Initiation Form</b> begins the project tracking process and gives NYC Planning the necessary details before the Informational Interest meeting. By submitting this form, you confirm your intent to file a Land Use Application with NYC Planning.
</p>
<p>
While some projects might still be in the early stages, all required fields (*) on this form must be completed. Once submitted, your project will be available to view in this portal. After reviewing your submission, NYC Planning will contact you with the next steps.
Expand All @@ -24,15 +25,15 @@
<Packages::Projects::ProjectInformation @form={{saveableForm}} />
</div>
<div class="cell large-4 sticky-sidebar">
<saveableForm.SubmitButton
@isEnabled={{saveablePackageForm.isSubmittable}}
<saveableForm.SubmitButton
@isEnabled={{saveableProjectForm.isSubmittable}}
@onClick={{this.submitPackage}}
/>
</div>
<saveableForm.ConfirmationModal>
Great job.
</saveableForm.ConfirmationModal>
</div>
</saveablePackageForm.SaveableForm>
</saveableProjectForm.SaveableForm>

</SaveableForm>
4 changes: 2 additions & 2 deletions client/app/components/packages/projects/new.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Component from '@glimmer/component';
import { action } from '@ember/object';
import { inject as service } from '@ember/service';
import { SaveableProjectForm } from '../../../validations/saveable-project-form';
import { SubmittableProjectForm } from '../../../validations/submittable-project-form';
import SaveableProjectForm from '../../../validations/saveable-project-form';
import SubmittableProjectForm from '../../../validations/submittable-project-form';

export default class ProjectsNewFormComponent extends Component {
validations = {
Expand Down
3 changes: 2 additions & 1 deletion client/app/routes/projects/new.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
import AuthenticatedRouteMixin from "ember-simple-auth/mixins/authenticated-route-mixin";

Check failure on line 3 in client/app/routes/projects/new.js

View workflow job for this annotation

GitHub Actions / 🧪 Test client code

Strings must use singlequote

Check failure on line 3 in client/app/routes/projects/new.js

View workflow job for this annotation

GitHub Actions / 🧪 Test client code

Strings must use singlequote

export default class ProjectsNewRoute extends Route {
export default class ProjectsNewRoute extends Route.extend(AuthenticatedRouteMixin) {
@service store;

async model() {
Expand Down

0 comments on commit fb92738

Please sign in to comment.