refactor: add column id PK and updated column code UQ
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
762ec3045f
commit
ac344d6edd
|
@ -0,0 +1,14 @@
|
||||||
|
ALTER TABLE `vn`.`itemShelving` DROP FOREIGN KEY itemShelving_fk2;
|
||||||
|
ALTER TABLE `vn`.`shelvingLog` DROP FOREIGN KEY shelvingLog_FK_ibfk_1;
|
||||||
|
ALTER TABLE `vn`.`smartTag` DROP FOREIGN KEY smartTag_shelving_fk;
|
||||||
|
ALTER TABLE `vn`.`workerShelving` DROP FOREIGN KEY workerShelving_shelving_fk;
|
||||||
|
|
||||||
|
ALTER TABLE `vn`.`shelving` DROP PRIMARY KEY;
|
||||||
|
ALTER TABLE `vn`.`shelving` ADD id INT auto_increment PRIMARY KEY NULL;
|
||||||
|
ALTER TABLE `vn`.`shelving` CHANGE id id int(11) auto_increment NOT NULL FIRST;
|
||||||
|
ALTER TABLE `vn`.`shelving` ADD CONSTRAINT shelving_UN UNIQUE KEY (code);
|
||||||
|
|
||||||
|
ALTER TABLE `vn`.`itemShelving` ADD CONSTRAINT itemShelving_fk2 FOREIGN KEY (shelvingFk) REFERENCES `vn`.`shelving`(code) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||||
|
ALTER TABLE `vn`.`shelvingLog` ADD CONSTRAINT shelvingLog_FK_ibfk_1 FOREIGN KEY (originFk) REFERENCES `vn`.`shelving`(code) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||||
|
ALTER TABLE `vn`.`smartTag` ADD CONSTRAINT smartTag_FK FOREIGN KEY (shelvingFk) REFERENCES `vn`.`shelving`(code) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
ALTER TABLE `vn`.`workerShelving` ADD CONSTRAINT workerShelving_FK_1 FOREIGN KEY (shelvingFk) REFERENCES `vn`.`shelving`(code) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
@ -8,20 +8,19 @@
|
||||||
},
|
},
|
||||||
"properties": {
|
"properties": {
|
||||||
"id": {
|
"id": {
|
||||||
"type": "string",
|
"type": "number",
|
||||||
"id": true,
|
"id": true,
|
||||||
"description": "Identifier",
|
"description": "Identifier"
|
||||||
"mysql": {
|
},
|
||||||
"columnName": "code"
|
"code": {
|
||||||
}
|
"type": "string",
|
||||||
|
"required": true
|
||||||
},
|
},
|
||||||
"parkingFk": {
|
"parkingFk": {
|
||||||
"type": "number",
|
"type": "number"
|
||||||
"required": true
|
|
||||||
},
|
},
|
||||||
"isPrinted": {
|
"isPrinted": {
|
||||||
"type": "boolean",
|
"type": "boolean"
|
||||||
"required": true
|
|
||||||
},
|
},
|
||||||
"priority": {
|
"priority": {
|
||||||
"type": "number"
|
"type": "number"
|
||||||
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
{
|
||||||
|
"name": "ShelvingLog",
|
||||||
|
"base": "VnModel",
|
||||||
|
"options": {
|
||||||
|
"mysql": {
|
||||||
|
"table": "shelvingLog"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "number",
|
||||||
|
"id": true,
|
||||||
|
"description": "Identifier"
|
||||||
|
},
|
||||||
|
"originFk": {
|
||||||
|
"type": "string",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"userFk": {
|
||||||
|
"type": "number",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"action": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"creationDate": {
|
||||||
|
"type": "date"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"changedModel": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"oldInstance": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"newInstance": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"changedModelId": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"changedModelValue": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -11,7 +11,7 @@
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-textfield
|
<vn-textfield
|
||||||
label="Code"
|
label="Code"
|
||||||
ng-model="$ctrl.shelving.id"
|
ng-model="$ctrl.shelving.code"
|
||||||
rule
|
rule
|
||||||
vn-focus>
|
vn-focus>
|
||||||
</vn-textfield>
|
</vn-textfield>
|
||||||
|
|
|
@ -8,12 +8,33 @@
|
||||||
<form name="form" vn-http-submit="$ctrl.onSubmit()" class="vn-w-md">
|
<form name="form" vn-http-submit="$ctrl.onSubmit()" class="vn-w-md">
|
||||||
<vn-card class="vn-pa-lg">
|
<vn-card class="vn-pa-lg">
|
||||||
<vn-vertical>
|
<vn-vertical>
|
||||||
|
<vn-horizontal>
|
||||||
<vn-textfield
|
<vn-textfield
|
||||||
label="Code"
|
label="Code"
|
||||||
ng-model="$ctrl.shelving.id"
|
ng-model="$ctrl.shelving.code"
|
||||||
rule
|
rule
|
||||||
vn-focus>
|
vn-focus>
|
||||||
</vn-textfield>
|
</vn-textfield>
|
||||||
|
<vn-autocomplete
|
||||||
|
vn-one
|
||||||
|
url="Parkings"
|
||||||
|
label="Parking"
|
||||||
|
show-field="code"
|
||||||
|
value-field="id"
|
||||||
|
ng-model="$ctrl.shelving.parkingFk">
|
||||||
|
</vn-autocomplete>
|
||||||
|
</vn-horizontal>
|
||||||
|
<vn-horizontal>
|
||||||
|
<vn-input-number vn-one
|
||||||
|
label="Priority"
|
||||||
|
ng-model="$ctrl.shelving.priority"
|
||||||
|
rule>
|
||||||
|
</vn-input-number>
|
||||||
|
<vn-check
|
||||||
|
label="Recyclable"
|
||||||
|
ng-model="$ctrl.shelving.isRecyclable">
|
||||||
|
</vn-check>
|
||||||
|
</vn-horizontal>
|
||||||
</vn-vertical>
|
</vn-vertical>
|
||||||
</vn-card>
|
</vn-card>
|
||||||
<vn-button-bar>
|
<vn-button-bar>
|
||||||
|
|
|
@ -4,7 +4,7 @@ import Section from 'salix/components/section';
|
||||||
export default class Controller extends Section {
|
export default class Controller extends Section {
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
return this.$.watcher.submit().then(res =>
|
return this.$.watcher.submit().then(res =>
|
||||||
this.$state.go('shelving.card.basicData', {id: res.data.id})
|
this.$state.go('shelving.card.summary', {id: res.data.id})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
Name: Nombre
|
|
||||||
Tax number: NIF/CIF
|
|
||||||
Business name: Razón social
|
|
||||||
Web user: Usuario Web
|
|
||||||
Email: E-mail
|
|
||||||
Create and edit: Crear y editar
|
|
||||||
You can save multiple emails: >-
|
|
||||||
Puede guardar varios correos electrónicos encadenándolos mediante comas
|
|
||||||
sin espacios, ejemplo: user@dominio.com, user2@dominio.com siendo el primer
|
|
||||||
correo electrónico el principal
|
|
||||||
The type of business must be filled in basic data: El tipo de negocio debe estar rellenado en datos básicos
|
|
|
@ -1,6 +1,6 @@
|
||||||
<vn-descriptor-content
|
<vn-descriptor-content
|
||||||
module="shelving"
|
module="shelving"
|
||||||
description="$ctrl.shelving.id"
|
description="$ctrl.shelving.code"
|
||||||
summary="$ctrl.$.summary">
|
summary="$ctrl.$.summary">
|
||||||
<slot-menu>
|
<slot-menu>
|
||||||
<vn-item
|
<vn-item
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
<div class="attributes">
|
<div class="attributes">
|
||||||
<vn-label-value
|
<vn-label-value
|
||||||
label="Code"
|
label="Code"
|
||||||
value="{{$ctrl.shelving.id}}">
|
value="{{$ctrl.shelving.code}}">
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
<vn-label-value
|
<vn-label-value
|
||||||
label="Parking"
|
label="Parking"
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
Tax number: NIF / CIF
|
|
||||||
All entries with current supplier: Todas las entradas con el proveedor actual
|
|
||||||
Go to client: Ir al cliente
|
|
||||||
Verified supplier: Proveedor verificado
|
|
||||||
Unverified supplier: Proveedor no verificado
|
|
||||||
Inactive supplier: Proveedor inactivo
|
|
||||||
Create invoiceIn: Crear factura recibida
|
|
|
@ -13,9 +13,13 @@
|
||||||
translate-attr="{title: 'View shelving'}"
|
translate-attr="{title: 'View shelving'}"
|
||||||
class="vn-item search-result">
|
class="vn-item search-result">
|
||||||
<vn-item-section>
|
<vn-item-section>
|
||||||
<h6>{{::shelving.id}}</h6>
|
<h6>{{::shelving.code}}</h6>
|
||||||
<div>{{::shelving.parking.code}}</div>
|
<vn-label-value label="Parking"
|
||||||
<div>{{::shelving.priority}}</div>
|
value="{{::shelving.parking.code}}">
|
||||||
|
</vn-label-value>
|
||||||
|
<vn-label-value label="Priority"
|
||||||
|
value="{{::shelving.priority}}">
|
||||||
|
</vn-label-value>
|
||||||
</vn-item-section>
|
</vn-item-section>
|
||||||
<vn-item-section side>
|
<vn-item-section side>
|
||||||
<vn-icon-button
|
<vn-icon-button
|
||||||
|
|
|
@ -1,5 +1,2 @@
|
||||||
Payment deadline: Plazo de pago
|
Parking: Parking
|
||||||
Pay day: Dia de pago
|
Priority: Prioridad
|
||||||
Account: Cuenta
|
|
||||||
Pay method: Metodo de pago
|
|
||||||
Tax number: Nif
|
|
|
@ -1 +0,0 @@
|
||||||
Accounts: Cuentas
|
|
|
@ -0,0 +1 @@
|
||||||
|
<vn-log url="ShelvingLog" origin-id="$ctrl.$params.id"></vn-log>
|
|
@ -0,0 +1,7 @@
|
||||||
|
import ngModule from '../module';
|
||||||
|
import Section from 'salix/components/section';
|
||||||
|
|
||||||
|
ngModule.vnComponent('vnShelvingLog', {
|
||||||
|
template: require('./index.html'),
|
||||||
|
controller: Section,
|
||||||
|
});
|
|
@ -7,7 +7,7 @@
|
||||||
<vn-portal slot="topbar">
|
<vn-portal slot="topbar">
|
||||||
<vn-searchbar
|
<vn-searchbar
|
||||||
panel="vn-shelving-search-panel"
|
panel="vn-shelving-search-panel"
|
||||||
info="Search shelving by code"
|
info="Search shelving by code, parking or worker"
|
||||||
model="model"
|
model="model"
|
||||||
expr-builder="$ctrl.exprBuilder(param, value)">
|
expr-builder="$ctrl.exprBuilder(param, value)">
|
||||||
</vn-searchbar>
|
</vn-searchbar>
|
||||||
|
|
|
@ -11,14 +11,10 @@ export default class Shelving extends ModuleMain {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
$onInit() {
|
|
||||||
console.log(this.$params);
|
|
||||||
}
|
|
||||||
|
|
||||||
exprBuilder(param, value) {
|
exprBuilder(param, value) {
|
||||||
switch (param) {
|
switch (param) {
|
||||||
case 'search':
|
case 'search':
|
||||||
return {id: {like: `%${value}%`}};
|
return {code: {like: `%${value}%`}};
|
||||||
case 'parkingFk':
|
case 'parkingFk':
|
||||||
case 'userFk':
|
case 'userFk':
|
||||||
case 'isRecyclable':
|
case 'isRecyclable':
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Search shelving by code, parking or worker: Busca matrículas por código, parking o trabajador
|
|
@ -2,7 +2,7 @@
|
||||||
"module": "shelving",
|
"module": "shelving",
|
||||||
"name": "Shelvings",
|
"name": "Shelvings",
|
||||||
"icon" : "contact_support",
|
"icon" : "contact_support",
|
||||||
"dependencies": [],
|
"dependencies": ["worker"],
|
||||||
"validations" : true,
|
"validations" : true,
|
||||||
"menus": {
|
"menus": {
|
||||||
"main": [
|
"main": [
|
||||||
|
|
|
@ -1,4 +1 @@
|
||||||
Province: Provincia
|
Search shelvings by code: Busca matriculas por código
|
||||||
Country: País
|
|
||||||
Tax number: NIF / CIF
|
|
||||||
Search suppliers by id, name or alias: Busca proveedores por id, nombre o alias
|
|
|
@ -1,12 +1,12 @@
|
||||||
<vn-card class="summary">
|
<vn-card class="summary">
|
||||||
<h5>
|
<h5>
|
||||||
<a ng-if="::$ctrl.summary.id"
|
<a ng-if="::$ctrl.summary.code"
|
||||||
vn-tooltip="Go to the shelving"
|
vn-tooltip="Go to the shelving"
|
||||||
ui-sref="shelving.card.summary({id: {{::$ctrl.summary.id}}})"
|
ui-sref="shelving.card.summary({id: {{::$ctrl.summary.code}}})"
|
||||||
name="goToSummary">
|
name="goToSummary">
|
||||||
<vn-icon-button icon="launch"></vn-icon-button>
|
<vn-icon-button icon="launch"></vn-icon-button>
|
||||||
</a>
|
</a>
|
||||||
<span>{{::$ctrl.summary.id}}</span>
|
<span>{{::$ctrl.summary.code}}</span>
|
||||||
</h5>
|
</h5>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-one>
|
<vn-one>
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
<vn-vertical>
|
<vn-vertical>
|
||||||
<vn-label-value
|
<vn-label-value
|
||||||
label="Code"
|
label="Code"
|
||||||
value="{{::$ctrl.summary.id}}">
|
value="{{::$ctrl.summary.code}}">
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
<vn-label-value
|
<vn-label-value
|
||||||
label="Parking"
|
label="Parking"
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
<vn-label-value label="Worker">
|
<vn-label-value label="Worker">
|
||||||
<span
|
<span
|
||||||
ng-click="workerDescriptor.show($event, $ctrl.summary.userFk)"
|
ng-click="workerDescriptor.show($event, $ctrl.summary.worker.user.id)"
|
||||||
class="link">
|
class="link">
|
||||||
{{$ctrl.summary.worker.user.nickname}}
|
{{$ctrl.summary.worker.user.nickname}}
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
Verified: Verificado
|
Code: Código
|
||||||
Country: País
|
Parking: Parking
|
||||||
Tax number: NIF / CIF
|
Priority: Prioridad
|
||||||
Search suppliers by id, name or alias: Busca proveedores por id, nombre o alias
|
Worker: Trabajador
|
||||||
Is Farmer: Es agrícola
|
Recyclable: Reciclable
|
||||||
Sage tax type: Tipo de impuesto Sage
|
|
||||||
Sage transaction type: Tipo de transacción Sage
|
|
||||||
Sage withholding: Retencion Sage
|
|
||||||
Go to the supplier: Ir al proveedor
|
|
||||||
Responsible: Responsable
|
|
||||||
Supplier activity: Actividad proveedor
|
|
||||||
Healt register: Pasaporte sanitario
|
|
Loading…
Reference in New Issue