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, fileName,
myOptions myOptions
); );
if (item.isPhotoRequested) {
await item.updateAttribute(
'isPhotoRequested',
false,
myOptions
);
}
} }
if (fs.existsSync(srcFilePath)) if (fs.existsSync(srcFilePath))

View File

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

View File

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

View File

@ -182,6 +182,12 @@
ng-model="$ctrl.item.isFragile" ng-model="$ctrl.item.isFragile"
info="Is shown at website, app that this item cannot travel (wreath, palms, ...)"> info="Is shown at website, app that this item cannot travel (wreath, palms, ...)">
</vn-check> </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-horizontal>
</vn-card> </vn-card>
<vn-button-bar> <vn-button-bar>

View File

@ -11,4 +11,6 @@ Identifier: Identificador
Fragile: Frágil 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, ...) 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 Multiplier: Multiplicador
Generic: Genérico 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}} {{$ctrl.summary.item.itemType.worker.user.name}}
</span> </span>
</vn-label-value> </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>
<vn-one name="otherData"> <vn-one name="otherData">
<h4 ng-show="$ctrl.isBuyer"> <h4 ng-show="$ctrl.isBuyer">