Update new CLIN fields so they post data properly
This commit is contained in:
parent
e017cd12af
commit
61d7bc92d8
@ -1,11 +1,11 @@
|
|||||||
import DateSelector from './date_selector'
|
import DateSelector from './date_selector'
|
||||||
import optionsinput from './options_input'
|
|
||||||
import textinput from './text_input'
|
import textinput from './text_input'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'clin-fields',
|
name: 'clin-fields',
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
|
DateSelector,
|
||||||
textinput,
|
textinput,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ export default {
|
|||||||
initialyear: { type: String },
|
initialyear: { type: String },
|
||||||
mindate: { type: String },
|
mindate: { type: String },
|
||||||
maxdate: { type: String },
|
maxdate: { type: String },
|
||||||
|
nameTag: { type: String }
|
||||||
},
|
},
|
||||||
|
|
||||||
data: function() {
|
data: function() {
|
||||||
@ -26,6 +27,7 @@ export default {
|
|||||||
day: this.initialday,
|
day: this.initialday,
|
||||||
month: this.initialmonth,
|
month: this.initialmonth,
|
||||||
year: this.initialyear,
|
year: this.initialyear,
|
||||||
|
name: this.nameTag,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{% extends "portfolios/base.html" %}
|
{% extends "portfolios/base.html" %}
|
||||||
|
|
||||||
{% from 'components/date_picker.html' import DatePicker %}
|
{% from 'components/date_picker.html' import DatePicker %}
|
||||||
|
{% from 'components/icon.html' import Icon %}
|
||||||
{% from 'components/save_button.html' import SaveButton %}
|
{% from 'components/save_button.html' import SaveButton %}
|
||||||
{% from 'components/options_input.html' import OptionsInput %}
|
{% from 'components/options_input.html' import OptionsInput %}
|
||||||
{% from 'components/text_input.html' import TextInput %}
|
{% from 'components/text_input.html' import TextInput %}
|
||||||
@ -8,6 +9,7 @@
|
|||||||
|
|
||||||
{% macro CLINFields(fields) %}
|
{% macro CLINFields(fields) %}
|
||||||
<div>
|
<div>
|
||||||
|
<hr>
|
||||||
{{ OptionsInput(fields.jedi_clin_type) }}
|
{{ OptionsInput(fields.jedi_clin_type) }}
|
||||||
{{ TextInput(fields.number) }}
|
{{ TextInput(fields.number) }}
|
||||||
{{ DatePicker(fields.start_date) }}
|
{{ DatePicker(fields.start_date) }}
|
||||||
@ -67,60 +69,117 @@
|
|||||||
<input type="text" :id="'clins-' + clinIndex + '-number'" placeholder="">
|
<input type="text" :id="'clins-' + clinIndex + '-number'" placeholder="">
|
||||||
<input type="hidden" :name="'clins-' + clinIndex + '-number'">
|
<input type="hidden" :name="'clins-' + clinIndex + '-number'">
|
||||||
</div>
|
</div>
|
||||||
<fieldset class="usa-input date-picker">
|
|
||||||
|
<date-selector :name-tag="'clins-' + clinIndex + '-start_date'" inline-template>
|
||||||
|
<fieldset class="usa-input date-picker" v-bind:class="{ 'usa-input--success': isDateValid }">
|
||||||
<legend>
|
<legend>
|
||||||
<div class="usa-input__title"> Start Date
|
<div class="usa-input__title">
|
||||||
|
Start of period of performance (PoP)
|
||||||
</div>
|
</div>
|
||||||
</legend>
|
</legend>
|
||||||
|
|
||||||
<div class="date-picker-component">
|
<div class="date-picker-component">
|
||||||
<input :name="'clins-' + clinIndex + '-start_date'" type="hidden">
|
<input :name="name" v-bind:value="formattedDate" type="hidden" />
|
||||||
|
|
||||||
<div class="usa-form-group usa-form-group-month">
|
<div class="usa-form-group usa-form-group-month">
|
||||||
<label>Month
|
<label>Month</label>
|
||||||
</label>
|
<input
|
||||||
<input name="date-month" max="12" maxlength="2" min="1" type="number" class="">
|
name="date-month"
|
||||||
|
max="12"
|
||||||
|
maxlength="2"
|
||||||
|
min="1"
|
||||||
|
type="number"
|
||||||
|
v-bind:class="{ 'usa-input-error': (month && !isMonthValid) }"
|
||||||
|
v-model="month"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="usa-form-group usa-form-group-day">
|
<div class="usa-form-group usa-form-group-day">
|
||||||
<label>Day
|
<label>Day</label>
|
||||||
</label>
|
<input
|
||||||
<input name="date-day" maxlength="2" min="1" type="number" max="31" class="">
|
name="date-day"
|
||||||
|
maxlength="2"
|
||||||
|
min="1"
|
||||||
|
type="number"
|
||||||
|
v-bind:class="{ 'usa-input-error': (day && !isDayValid) }"
|
||||||
|
v-bind:max="daysMaxCalculation"
|
||||||
|
v-model="day"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="usa-form-group usa-form-group-year">
|
<div class="usa-form-group usa-form-group-year">
|
||||||
<label>Year
|
<label>Year</label>
|
||||||
</label>
|
<input
|
||||||
<input id="date-year" maxlength="4" type="number">
|
name="date-year"
|
||||||
|
maxlength="4"
|
||||||
|
type="number"
|
||||||
|
v-model="year"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="usa-form-group-date-ok" v-if="isDateValid">
|
||||||
|
{{ Icon("ok", classes="icon--green") }}
|
||||||
</div>
|
</div>
|
||||||
<!---->
|
|
||||||
</div>
|
</div>
|
||||||
<p class="usa-input-error-message">
|
|
||||||
</p>
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset class="usa-input date-picker">
|
</date-selector>
|
||||||
|
|
||||||
|
<date-selector :name-tag="'clins-' + clinIndex + '-end_date'" inline-template>
|
||||||
|
<fieldset class="usa-input date-picker" v-bind:class="{ 'usa-input--success': isDateValid }">
|
||||||
<legend>
|
<legend>
|
||||||
<div class="usa-input__title"> End Date
|
<div class="usa-input__title">
|
||||||
|
End of period of performance (PoP)
|
||||||
</div>
|
</div>
|
||||||
</legend>
|
</legend>
|
||||||
|
|
||||||
<div class="date-picker-component">
|
<div class="date-picker-component">
|
||||||
<input :name="'clins-' + clinIndex + '-end_date'" type="hidden">
|
<input :name="name" v-bind:value="formattedDate" type="hidden" />
|
||||||
|
|
||||||
<div class="usa-form-group usa-form-group-month">
|
<div class="usa-form-group usa-form-group-month">
|
||||||
<label>Month
|
<label>Month</label>
|
||||||
</label>
|
<input
|
||||||
<input name="date-month" max="12" maxlength="2" min="1" type="number" class="">
|
name="date-month"
|
||||||
|
max="12"
|
||||||
|
maxlength="2"
|
||||||
|
min="1"
|
||||||
|
type="number"
|
||||||
|
v-bind:class="{ 'usa-input-error': (month && !isMonthValid) }"
|
||||||
|
v-model="month"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="usa-form-group usa-form-group-day">
|
<div class="usa-form-group usa-form-group-day">
|
||||||
<label>Day
|
<label>Day</label>
|
||||||
</label>
|
<input
|
||||||
<input name="date-day" maxlength="2" min="1" type="number" max="31" class="">
|
name="date-day"
|
||||||
|
maxlength="2"
|
||||||
|
min="1"
|
||||||
|
type="number"
|
||||||
|
v-bind:class="{ 'usa-input-error': (day && !isDayValid) }"
|
||||||
|
v-bind:max="daysMaxCalculation"
|
||||||
|
v-model="day"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="usa-form-group usa-form-group-year">
|
<div class="usa-form-group usa-form-group-year">
|
||||||
<label>Year
|
<label>Year</label>
|
||||||
</label>
|
<input
|
||||||
<input id="date-year" maxlength="4" type="number">
|
name="date-year"
|
||||||
|
maxlength="4"
|
||||||
|
type="number"
|
||||||
|
v-model="year"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="usa-form-group-date-ok" v-if="isDateValid">
|
||||||
|
{{ Icon("ok", classes="icon--green") }}
|
||||||
</div>
|
</div>
|
||||||
<!---->
|
|
||||||
</div>
|
</div>
|
||||||
<p class="usa-input-error-message">
|
|
||||||
</p>
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
</date-selector>
|
||||||
|
|
||||||
<div class=" usa-input usa-input--validation--anything">
|
<div class=" usa-input usa-input--validation--anything">
|
||||||
<label :for="'clins-' + clinIndex + '-obligated_amount'">
|
<label :for="'clins-' + clinIndex + '-obligated_amount'">
|
||||||
<div class="usa-input__title"> Obligated Amount
|
<div class="usa-input__title"> Obligated Amount
|
||||||
|
Loading…
x
Reference in New Issue
Block a user