7489-testToMaster #2515

Merged
alexm merged 329 commits from 7489-testToMaster into master 2024-05-28 05:30:19 +00:00
5 changed files with 13 additions and 20 deletions
Showing only changes of commit 3a429a31da - Show all commits

View File

@ -3,7 +3,7 @@ ALTER TABLE `vn`.`worker` DROP COLUMN `locker`;
CREATE TABLE `vn`.`locker` ( CREATE TABLE `vn`.`locker` (
`id` int(100), `id` int(100) auto_increment,
`code` varchar(10) DEFAULT NULL, `code` varchar(10) DEFAULT NULL,
`gender` varchar(255) DEFAULT NULL, `gender` varchar(255) DEFAULT NULL,
`workerFk` int(10) unsigned DEFAULT NULL, `workerFk` int(10) unsigned DEFAULT NULL,
@ -22,12 +22,12 @@ ON DELETE SET NULL;
-- Insertar taquillas disponibles para mujeres (1A - 73A / 1B - 73B) -- Insertar taquillas disponibles para mujeres (1A - 73A / 1B - 73B)
INSERT INTO `vn`.`locker` (code, gender, workerFk) VALUES INSERT INTO `vn`.`locker` (id, code, gender, workerFk) VALUES
('1A', 'M', NULL), ('2A', 'M', NULL), ('3A', 'M', NULL), ('4A', 'M', NULL), ('5A', 'M', NULL), ('6A', 'M', NULL), ('7A', 'M', NULL), ('1A', 'M', NULL), ('2A', 'M', NULL), ('3A', 'M', NULL), ('4A', 'M', NULL), ('5A', 'M', NULL), ('6A', 'M', NULL), ('7A', 'M', NULL),
('1B', 'M', NULL), ('2B', 'M', NULL), ('3B', 'M', NULL), ('4B', 'M', NULL), ('5B', 'M', NULL), ('6B', 'M', NULL), ('7B', 'M', NULL); ('1B', 'M', NULL), ('2B', 'M', NULL), ('3B', 'M', NULL), ('4B', 'M', NULL), ('5B', 'M', NULL), ('6B', 'M', NULL), ('7B', 'M', NULL);
-- Insertar taquillas disponibles para mujeres (200A - 217A / 200B - 217B) -- Insertar taquillas disponibles para mujeres (200A - 217A / 200B - 217B)
INSERT INTO `vn`.`locker` (code, gender, workerFk) VALUES INSERT INTO `vn`.`locker` (id, code, gender, workerFk) VALUES
('200A', 'F', NULL), ('201A', 'F', NULL), ('202A', 'F', NULL), ('203A', 'F', NULL), ('204A', 'F', NULL), ('205A', 'F', NULL), ('206A', 'F', NULL), ('200A', 'F', NULL), ('201A', 'F', NULL), ('202A', 'F', NULL), ('203A', 'F', NULL), ('204A', 'F', NULL), ('205A', 'F', NULL), ('206A', 'F', NULL),
('200B', 'F', NULL), ('201B', 'F', NULL), ('202B', 'F', NULL), ('203B', 'F', NULL), ('204B', 'F', NULL), ('205B', 'F', NULL), ('206B', 'F', NULL); ('200B', 'F', NULL), ('201B', 'F', NULL), ('202B', 'F', NULL), ('203B', 'F', NULL), ('204B', 'F', NULL), ('205B', 'F', NULL), ('206B', 'F', NULL);

View File

@ -45,9 +45,6 @@
"code": { "code": {
"type" : "string" "type" : "string"
}, },
"locker": {
"type" : "number"
},
"fi": { "fi": {
"type" : "string" "type" : "string"
}, },

View File

@ -13,16 +13,16 @@ class Controller extends Section {
return this.$.watcher.submit() return this.$.watcher.submit()
.then(() => this.card.reload()); .then(() => this.card.reload());
} }
async chooseLocker() { // async chooseLocker() {
const locker = // const locker =
`SELECT l.code // `SELECT l.code
FROM worker w // FROM worker w
JOIN locker l ON w.sex = l.gender // JOIN locker l ON w.sex = l.gender
WHERE w.id = ? AND l.workerFk IS NULL; // WHERE w.id = ? AND l.workerFk IS NULL;
`[this.code]; // `[this.id];
return locker; // return locker;
} // }
} }
ngModule.vnComponent('vnWorkerBasicData', { ngModule.vnComponent('vnWorkerBasicData', {

View File

@ -59,7 +59,7 @@
></vn-link-phone> ></vn-link-phone>
</vn-label-value> </vn-label-value>
<vn-label-value label="Locker" <vn-label-value label="Locker"
value="{{worker.locker.code}}"> >
</vn-label-value> </vn-label-value>
</vn-one> </vn-one>
<vn-one> <vn-one>

View File

@ -51,10 +51,6 @@ class Controller extends Summary {
scope: {fields: ['id', 'code', 'name']} scope: {fields: ['id', 'code', 'name']}
} }
} }
},
{
relation: 'locker',
scope: {fields: ['code']}
} }
] ]
}; };