From 38bf90da66157114bdc2217fb8429c6cc9f8f27c Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 11 Oct 2023 13:26:27 +0200 Subject: [PATCH] refs #5919 sql --- db/changes/234201/00-locker.sql | 19 +++++++++++++++++++ modules/worker/front/basic-data/index.html | 5 +++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 db/changes/234201/00-locker.sql diff --git a/db/changes/234201/00-locker.sql b/db/changes/234201/00-locker.sql new file mode 100644 index 000000000..6e9eca307 --- /dev/null +++ b/db/changes/234201/00-locker.sql @@ -0,0 +1,19 @@ +CREATE TABLE `vn`.`locker` ( + `code` varchar(10) NOT NULL, + `gender` varchar(255) DEFAULT NULL, + `workerFk` int(10) unsigned DEFAULT NULL, + PRIMARY KEY (`code`), + UNIQUE KEY `code` (`code`), + KEY `workerFk` (`workerFk`), + CONSTRAINT `locker_ibfk_1` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; + +-- Insertar taquillas disponibles para mujeres (1A - 73A / 1B - 73B) +INSERT INTO `vn`.`locker` (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), + ('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) +INSERT INTO `vn`.`locker` (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), + ('200B', 'F', NULL), ('201B', 'F', NULL), ('202B', 'F', NULL), ('203B', 'F', NULL), ('204B', 'F', NULL), ('205B', 'F', NULL), ('206B', 'F', NULL); diff --git a/modules/worker/front/basic-data/index.html b/modules/worker/front/basic-data/index.html index 73b066739..f9a73de6f 100644 --- a/modules/worker/front/basic-data/index.html +++ b/modules/worker/front/basic-data/index.html @@ -77,8 +77,9 @@ - + ng-model="$ctrl.worker.locker" + data="chooseLocker"> +