isPhotoRequired implemented

This commit is contained in:
Pau 2023-01-17 10:11:41 +01:00
parent 5d81cfc121
commit 99338bb6f8
6 changed files with 36 additions and 2 deletions

View File

@ -145,6 +145,13 @@ module.exports = Self => {
fileName,
myOptions
);
if (item.isPhotoRequested) {
await item.updateAttribute(
'isPhotoRequested',
false,
myOptions
);
}
}
if (fs.existsSync(srcFilePath))

View File

@ -24,6 +24,8 @@ module.exports = Self => {
const myOptions = {};
let tx;
params.isPhotoRequested = true;
if (typeof options == 'object')
Object.assign(myOptions, options);
@ -37,7 +39,8 @@ module.exports = Self => {
'typeFk',
'intrastatFk',
'originFk',
'relevancy'
'relevancy',
'isPhotoRequested',
];
for (const key in params) {

View File

@ -146,6 +146,12 @@
},
"isLaid": {
"type": "boolean"
},
"isPhotoRequested": {
"type": "boolean",
"mysql":{
"columnName": "doPhoto"
}
}
},
"relations": {

View File

@ -182,6 +182,12 @@
ng-model="$ctrl.item.isFragile"
info="Is shown at website, app that this item cannot travel (wreath, palms, ...)">
</vn-check>
<vn-check
vn-one
label="Do photo"
ng-model="$ctrl.item.isPhotoRequested"
info="This item does need a photo">
</vn-check>
</vn-horizontal>
</vn-card>
<vn-button-bar>

View File

@ -12,3 +12,5 @@ Fragile: Frágil
Is shown at website, app that this item cannot travel (wreath, palms, ...): Se muestra en la web, app que este artículo no puede viajar (coronas, palmas, ...)
Multiplier: Multiplicador
Generic: Genérico
This item does need a photo: Este artículo necesita una foto
Do photo: Hacer foto

View File

@ -65,6 +65,16 @@
{{$ctrl.summary.item.itemType.worker.user.name}}
</span>
</vn-label-value>
<vn-label-value label="Do photo"
style="display: grid; align-items: center;">
<vn-check
style="top: 5px;"
disabled="true"
vn-one
ng-model="$ctrl.item.isPhotoRequested"
info="This item does need a photo">
</vn-check>
</vn-label-value>
</vn-one>
<vn-one name="otherData">
<h4 ng-show="$ctrl.isBuyer">