Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/i18n/resources/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,7 @@
"address-details-lbl": "Address details",
"date-of-birth-lbl": "Date of birth",
"date-of-birth-placeholder": "dd/mm/yyyy, e.g. 25/11/1986",
"age-lbl": "Age",
"address-line-1-lbl": "Line 1",
"address-line-2-lbl": "Line 2",
"address-country-lbl": "Country",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/resources/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,7 @@
"address-details-lbl": "Адрес",
"date-of-birth-lbl": "Дата рождения",
"date-of-birth-placeholder": "дд/мм/гггг, например 25/11/1986",
"age-lbl": "Возраст",
"address-line-1-lbl": "Строка 1",
"address-line-2-lbl": "Строка 2",
"address-country-lbl": "Страна",
Expand Down
4 changes: 4 additions & 0 deletions src/js/formers/KycGeneralFormer.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export class KycGeneralFormer extends Former {
firstName: '',
lastName: '',
dateOfBirth: '',
age: '',
idDocType: '',
idDocFace: new Document(),
idDocBack: new Document(),
Expand Down Expand Up @@ -91,6 +92,7 @@ export class KycGeneralFormer extends Former {
this.attrs.firstName = source.firstName
this.attrs.lastName = source.lastName
this.attrs.dateOfBirth = source.dateOfBirth
this.attrs.age = source.age
this.attrs.idDocType = source.idDocType
this.attrs.idDocFace = source.idDocFace
this.attrs.idDocBack = source.idDocBack
Expand All @@ -105,6 +107,7 @@ export class KycGeneralFormer extends Former {
this.attrs.address.state = source.address.state
this.attrs.address.postalCode = source.address.postalCode
this.attrs.address.country = source.address.country
// console.dir(this.attrs)
}

/** @param {KycRequestRecord|KycRecoveryRequestRecord} source */
Expand Down Expand Up @@ -151,6 +154,7 @@ export class KycGeneralFormer extends Former {
first_name: str(attrs.firstName),
last_name: str(attrs.lastName),
date_of_birth: toRFC3339(attrs.dateOfBirth),
age: str(attrs.age),
address: {
line_1: str(address.line1),
line_2: str(address.line2),
Expand Down
2 changes: 2 additions & 0 deletions src/js/records/entities/kyc-general.record.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export class KycGeneralRecord extends KycRecord {
this.firstName = kyc.first_name
this.lastName = kyc.last_name
this.dateOfBirth = kyc.date_of_birth
this.age = kyc.age
this.address = {
line1: kycAddr.line_1,
line2: kycAddr.line_2,
Expand All @@ -26,5 +27,6 @@ export class KycGeneralRecord extends KycRecord {
this.avatar = new Document(kycDocs.kyc_avatar)
this.proofOfInvestor = new Document(kycDocs.kyc_proof_investor)
this.selfie = new Document(kycDocs.kyc_selfie)
// console.log(blob)
}
}
20 changes: 20 additions & 0 deletions src/vue/forms/KycGeneralForm/components/PersonalSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,22 @@
:disabled="isDisabled"
/>
</div>
<div class="app__form-field">
<amount-input-field
white-autofill
v-model="age"
:min="18"
:max="120"
:step="1"
@change="former.setAttr('age', age)"
@blur="touchField('age')"
name="verefication-general-age"
:asset="age"
:label="'general-form.age-lbl' | globalize"
:error-message="getFieldErrorMessage('age')"
:disabled="isDisabled"
/>
</div>
</div>
</div>
</template>
Expand All @@ -55,9 +71,11 @@
import formMixin from '@/vue/mixins/form.mixin'
import { required } from '@validators'
import { KycGeneralFormer } from '@/js/formers/KycGeneralFormer'
import InputField from '@/vue/fields/InputField.vue'

export default {
name: 'personal-section',
components: { InputField },

mixins: [formMixin],

Expand All @@ -77,6 +95,7 @@ export default {
firstName: this.former.attrs.firstName || '',
lastName: this.former.attrs.lastName || '',
dateOfBirth: this.former.attrs.dateOfBirth || '',
age: this.former.attrs.age || '',
}
},

Expand All @@ -85,6 +104,7 @@ export default {
firstName: { required },
lastName: { required },
dateOfBirth: { required },
age: { required },
}
},
}
Expand Down
Loading