From 726609b9305dbaad1a06ab3682e73ee2edef34e4 Mon Sep 17 00:00:00 2001 From: Olivier Legat Date: Sun, 12 Dec 2021 15:57:53 +0100 Subject: [PATCH] design en table --- resources/js/components/ScheduleComponent.vue | 231 +++++++++++++++++- resources/views/schedule/index.blade.php | 12 +- 2 files changed, 236 insertions(+), 7 deletions(-) diff --git a/resources/js/components/ScheduleComponent.vue b/resources/js/components/ScheduleComponent.vue index 8cb1532..c79e35c 100644 --- a/resources/js/components/ScheduleComponent.vue +++ b/resources/js/components/ScheduleComponent.vue @@ -4,6 +4,43 @@
←
+ +
+ + + + + + + + + + + + + +
+ + + S {{item.num}} - {{item.month}} {{item.year}} +
+ {{day.day}} {{day.num}} +
+
+ +
@@ -27,6 +64,85 @@ →
+ + + + + + @@ -96,7 +212,7 @@ export default { return mydays; }, prepareSched(dbscheds) { - var templateObj = {"type":{"label":"","value":""},"text":"","id_lie":null,"model_lie":null} + var templateObj = {"type":{"label":"","value":""},"text":"","id_lie":null,"model_lie":null,"id":null} //we need to make missing users Object.keys(this.users).forEach(id => { if(dbscheds[id] === undefined) { @@ -121,6 +237,12 @@ export default { }); }); return dbscheds; + }, + setModalData(id) { + console.log(id); + }, + eraseCell(id) { + } } }; @@ -165,4 +287,111 @@ export default { grid-column: auto; grid-row: auto /span 4; } + +table { + .Mon { + border-left: 4px solid; + } + .Fri { + border-right: 4px solid; + } +} + +.dynCell.day { + position: relative; + &:hover .btn { + opacity: 1; + } + $buttonBgColor: #4d4d4d; + + // Reset button Style to nice one + button { + display: inline; + border: none; + padding: 0.6rem 3rem; + margin: 0; + text-decoration: none; + background: $buttonBgColor; + font-size: 1rem; + cursor: pointer; + text-align: center; + transition: background 250ms ease-in-out, transform 150ms ease; + -webkit-appearance: none; + -moz-appearance: none; + } + + button:disabled, + button[disabled] { + color: #aaa; + } + + button:hover, + button:focus { + background: darken($buttonBgColor, 10%); + } + + button:focus { + outline: 1px solid #fff; + outline-offset: -4px; + } + + button:active { + transform: scale(0.99); + } + + .btn { + position: absolute; + top: 0.1rem; + right: 0.1rem; + padding: 0; + width: 1.8rem; + height: 1.8rem; + margin: 0; + background-color: $buttonBgColor; + opacity: 0; + transition: 200ms opacity; + &.hide { + opacity: 0 !important; + } + &:hover, + &:focus { + background-color: darken($buttonBgColor, 10%); + } + &.btn-clear { + color: darken($color: #fff, $amount: 5); + } + &:nth-last-child(2) { + right: inherit; + left: 0.1rem; + } + &:nth-last-child(3) { + right: inherit; + top: 2.1rem; + left: 0.1rem; + } + &:nth-last-child(1) { + top: 2.1rem; + right: 0.1rem; + } + } + } + + +@import "toastify-js/src/toastify.css"; +@import "vue-select/src/scss/vue-select.scss"; +.planning { + overflow: auto; + + td { + height: 50px; + } + + #text { + height: 5.5rem; + padding: 1rem 2rem; + resize: none; + width: 37rem; + margin: 0 auto; + } +} diff --git a/resources/views/schedule/index.blade.php b/resources/views/schedule/index.blade.php index b21b5ff..649082a 100644 --- a/resources/views/schedule/index.blade.php +++ b/resources/views/schedule/index.blade.php @@ -40,22 +40,22 @@ } --}} .support { - background-color: {{CellType::support()->value}}; + background-color: {{CellType::support()->value}} !important; } .rnd { - background-color: {{CellType::rnd()->value}}; + background-color: {{CellType::rnd()->value}} !important; } .dev { - background-color: {{CellType::dev()->value}}; + background-color: {{CellType::dev()->value}} !important; } .projects { - background-color: {{CellType::projects()->value}}; + background-color: {{CellType::projects()->value}} !important; } .management { - background-color: {{CellType::management()->value}}; + background-color: {{CellType::management()->value}} !important; } .absence, .Sat, .Sun { - background-color: {{CellType::absence()->value}}; + background-color: {{CellType::absence()->value}} !important; } @endpush