hotfix fix createWorker business
gitea/salix/pipeline/pr-master This commit looks good
Details
gitea/salix/pipeline/pr-master This commit looks good
Details
This commit is contained in:
parent
323d26f226
commit
79f6ac6b76
|
@ -53,7 +53,7 @@
|
|||
<vn-autocomplete vn-one
|
||||
ng-model="$ctrl.location.countryFk"
|
||||
url="Countries"
|
||||
show-field="country"
|
||||
show-field="name"
|
||||
value-field="id"
|
||||
label="Country">
|
||||
</vn-autocomplete>
|
||||
|
|
|
@ -202,7 +202,7 @@ module.exports = Self => {
|
|||
bossFk,
|
||||
fi,
|
||||
birth,
|
||||
|
||||
provinceFk,
|
||||
}, myOptions);
|
||||
|
||||
if (tx) await tx.commit();
|
||||
|
|
|
@ -27,13 +27,17 @@ module.exports = Self => {
|
|||
});
|
||||
|
||||
async function tinIsValid(err, done) {
|
||||
const countryFk = {
|
||||
fields: ['countryFk'],
|
||||
where: {id: this.provinceFk}
|
||||
};
|
||||
const countryCode = await Self.app.models.Province.findOne(countryFk);
|
||||
const filter = {
|
||||
fields: ['code'],
|
||||
where: {id: this.countryFk}
|
||||
where: {id: countryCode.countryFk}
|
||||
};
|
||||
const country = await Self.app.models.Country.findOne(filter);
|
||||
const code = country ? country.code.toLowerCase() : null;
|
||||
|
||||
if (!this.fi || !validateTin(this.fi, code))
|
||||
err();
|
||||
done();
|
||||
|
|
Loading…
Reference in New Issue