From b49fcadbba716e1ccfc30956917b8e020bdd5454 Mon Sep 17 00:00:00 2001 From: Adrian Hopek Date: Thu, 31 Mar 2022 10:12:33 +0200 Subject: [PATCH] #99 - ui changes (#100) * #99 - ui changes * #99 - logo fix * #99 - tailwind plugin for eslint * #99 - fix * #99 - fix * #99 - fix pagination * #99 - fix logo Co-authored-by: EwelinaLasowy --- .eslintrc.js | 6 + app/Eloquent/Models/User.php | 6 +- .../Controllers/VacationRequestController.php | 2 +- package-lock.json | 26 ++ package.json | 1 + public/img/logo-white.png | Bin 6896 -> 0 bytes public/img/logo-white.svg | 16 + resources/js/Pages/Calendar.vue | 36 +- resources/js/Pages/Dashboard.vue | 4 +- resources/js/Pages/Error.vue | 12 +- resources/js/Pages/Holidays/Create.vue | 23 +- resources/js/Pages/Holidays/Edit.vue | 23 +- resources/js/Pages/Holidays/Index.vue | 41 +-- resources/js/Pages/Login.vue | 22 +- resources/js/Pages/MonthlyUsage.vue | 20 +- resources/js/Pages/Users/Create.vue | 71 ++-- resources/js/Pages/Users/Edit.vue | 69 ++-- resources/js/Pages/Users/Index.vue | 69 ++-- resources/js/Pages/VacationLimits.vue | 67 ++-- resources/js/Pages/VacationRequest/Create.vue | 127 ++++--- resources/js/Pages/VacationRequest/Index.vue | 133 +++++-- .../VacationRequest/IndexForApprovers.vue | 327 +++++++++--------- resources/js/Pages/VacationRequest/Show.vue | 92 ++--- resources/js/Shared/Activity.vue | 10 +- resources/js/Shared/Layout/AppLayout.vue | 4 +- resources/js/Shared/Layout/GuestLayout.vue | 2 +- resources/js/Shared/MainMenu.vue | 91 ++--- resources/js/Shared/Pagination.vue | 14 +- resources/js/Shared/VacationBar.vue | 24 +- .../js/Shared/VacationTypeCalendarIcon.vue | 2 +- resources/js/Shared/Widgets/AbsenceList.vue | 8 +- .../Widgets/PendingVacationRequests.vue | 8 +- .../js/Shared/Widgets/UpcomingHolidays.vue | 8 +- .../Shared/Widgets/UserVacationRequests.vue | 6 +- resources/js/Shared/Widgets/VacationStats.vue | 36 +- resources/js/Shared/Widgets/Welcome.vue | 12 +- resources/js/app.js | 1 + routes/api.php | 6 +- 38 files changed, 758 insertions(+), 667 deletions(-) delete mode 100644 public/img/logo-white.png create mode 100644 public/img/logo-white.svg diff --git a/.eslintrc.js b/.eslintrc.js index e8d2e95..ba5b8c0 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,4 +1,5 @@ module.exports = { + plugins: ['tailwindcss'], env: { node: true, 'vue/setup-compiler-macros': true, @@ -15,5 +16,10 @@ module.exports = { 'comma-dangle': ['error', 'always-multiline'], 'object-curly-spacing': ['error', 'always'], 'vue/require-default-prop': 0, + 'tailwindcss/classnames-order': 'error', + 'tailwindcss/enforces-negative-arbitrary-values': 'error', + 'tailwindcss/enforces-shorthand': 'error', + 'tailwindcss/no-arbitrary-value': 'error', + 'tailwindcss/no-contradicting-classname': 'error', }, } diff --git a/app/Eloquent/Models/User.php b/app/Eloquent/Models/User.php index 0256927..3d12fa9 100644 --- a/app/Eloquent/Models/User.php +++ b/app/Eloquent/Models/User.php @@ -103,9 +103,9 @@ class User extends Authenticatable } return $query - ->where("first_name", "ILIKE", $text) - ->orWhere("last_name", "ILIKE", $text) - ->orWhere("email", "ILIKE", $text); + ->where("first_name", "ILIKE", "%{$text}%") + ->orWhere("last_name", "ILIKE", "%{$text}%") + ->orWhere("email", "ILIKE", "%{$text}%"); } public function scopeWithVacationLimitIn(Builder $query, YearPeriod $yearPeriod): Builder diff --git a/app/Infrastructure/Http/Controllers/VacationRequestController.php b/app/Infrastructure/Http/Controllers/VacationRequestController.php index 1ea2e0f..6d1cf6d 100644 --- a/app/Infrastructure/Http/Controllers/VacationRequestController.php +++ b/app/Infrastructure/Http/Controllers/VacationRequestController.php @@ -113,7 +113,7 @@ class VacationRequestController extends Controller "users" => UserResource::collection($users), "filters" => [ "status" => $status, - "user" => $user, + "user" => (int)$user, ], ]); } diff --git a/package-lock.json b/package-lock.json index b584c84..6e6fd67 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,6 +34,7 @@ }, "devDependencies": { "eslint": "^8.11.0", + "eslint-plugin-tailwindcss": "^3.5.0", "eslint-plugin-vue": "^8.5.0" } }, @@ -4344,6 +4345,20 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint-plugin-tailwindcss": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-tailwindcss/-/eslint-plugin-tailwindcss-3.5.0.tgz", + "integrity": "sha512-m1NyKX1qii3arb+zWrsNO5R15b27aaEm6m1ie9JM9a6yBrU9Q8H62obzT/U8PSITIucMY864uxljV8MiP7H6xg==", + "dev": true, + "dependencies": { + "fast-glob": "^3.2.5", + "postcss": "^8.4.4", + "tailwindcss": "^3.0.7" + }, + "engines": { + "node": ">=12.13.0" + } + }, "node_modules/eslint-plugin-vue": { "version": "8.5.0", "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-8.5.0.tgz", @@ -12883,6 +12898,17 @@ "v8-compile-cache": "^2.0.3" } }, + "eslint-plugin-tailwindcss": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-tailwindcss/-/eslint-plugin-tailwindcss-3.5.0.tgz", + "integrity": "sha512-m1NyKX1qii3arb+zWrsNO5R15b27aaEm6m1ie9JM9a6yBrU9Q8H62obzT/U8PSITIucMY864uxljV8MiP7H6xg==", + "dev": true, + "requires": { + "fast-glob": "^3.2.5", + "postcss": "^8.4.4", + "tailwindcss": "^3.0.7" + } + }, "eslint-plugin-vue": { "version": "8.5.0", "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-8.5.0.tgz", diff --git a/package.json b/package.json index 320b280..decb2c6 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ }, "devDependencies": { "eslint": "^8.11.0", + "eslint-plugin-tailwindcss": "^3.5.0", "eslint-plugin-vue": "^8.5.0" } } diff --git a/public/img/logo-white.png b/public/img/logo-white.png deleted file mode 100644 index 853f4e3246748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gNOUE}ezyhHACM{hl_>VwsuPF1ccH zawzj2!bqFMy(c!YY&6QB`eTsOyEuNVe3uPQ_PcViXAjMka~xDpfxI{K$WdG3k#5+Z z!H3^Q^6MfenK69!^RG64iPe(xZ9LS=nJs@=(%Y9|+MmCYfEntKQRiA(!Q);{sM2dtErVav>?k~3a6C5Q(KRhEaIi$GLaGkJS;#i;YWBb&v z&fpc+bxs+qqMpwCYrA<>Ud4AL;3eTCUGo$=(nui>BAHPvSk6U-D7b~}sQ~3ENWAIwB{Y zCX|S=ivId}adEIe3(LGbKsmFjgvC=o%#nP2?xLs2idnu0TVhRf&E|&pY!F1pX+S$j z@3rB1_VgwwmGR=OF37iG>gj+R^q~FuK;w-4MXw(4;mDAgVr5mfa;RPsD#d745m#pOLYckdL;zkw+>MqBTEf1y*0#p9LM-MH9&ZpH56!vZSV{bVYUC5dkMchxc}w zp?VDisYf0t*BHNkbKW(hG^8Ox-jl!%eA=rc`;vtjXsBiuO?u8Ye87P6#~R+vf5w-Y znRxtP+npplO+)l~P5Zi+G^hc-^#p>E{LC|4Wiu2BBv;Yd?n{psCvxmX*;ktRCuxyP z*EbbTMBE-KQ@VCdeou(y@=N|#6e8r;8e-W_0Pi*;2P;)07xd>uIPTfydA8b|@>E<- zzb49fcWX4nLEklpn4ZEto-eW2lwZrz5XqKt277Ve^`*xQf=KoQ_EWG%L>g*Fq@l59 zCr;&hVVa^;_6Hp_g8ZY}*A>ykipAF5KN<-+0 zQnjb>)?rJxre2VYyT;|ZQ9H14jJm72Xx7>YxjI-6ZKUi0Nc%l7OWoIIGbO4Sz{sO$ z%HBoFnAHD(HuuVwun@aMir|Tl()h44^p@CJ5%RKpBD0%92Q~W=9l$_Cv^i?x4bL?d xe11&@M}w?)%86o8*Hn-ug|_7XU*+spo-wqXdqpgbc!foxf6rLER?{W={{UNO2qXXi diff --git a/public/img/logo-white.svg b/public/img/logo-white.svg new file mode 100644 index 0000000..a8798a0 --- /dev/null +++ b/public/img/logo-white.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + blumilk_ + + diff --git a/resources/js/Pages/Calendar.vue b/resources/js/Pages/Calendar.vue index 954399f..60e165d 100644 --- a/resources/js/Pages/Calendar.vue +++ b/resources/js/Pages/Calendar.vue @@ -3,28 +3,28 @@
-

+

Kalendarz urlopów

-
+
- + - + @@ -32,32 +32,32 @@ v-if="nextMonth" as="button" :href="`/vacation/calendar/${nextMonth.value}`" - class="flex items-center justify-center rounded-r-md border border-l-0 border-gray-300 bg-white py-2 pl-4 pr-3 text-gray-400 hover:text-gray-500 focus:relative md:w-9 md:px-2 md:hover:bg-gray-50" + class="flex focus:relative justify-center items-center p-2 text-gray-400 hover:text-gray-500 bg-white rounded-r-md border border-l-0 border-gray-300 md:px-2 md:w-9 md:hover:bg-gray-50" > - + - +
- +
-
+
{{ selectedMonth.name }} {{ years.selected.year }}
@@ -65,13 +65,13 @@
{{ day.dayOfMonth }} -

+

{{ day.dayOfWeek }}

@@ -83,9 +83,9 @@ v-for="user in users.data" :key="user.id" > -
+
- +
diff --git a/resources/js/Pages/Dashboard.vue b/resources/js/Pages/Dashboard.vue index ba6e5d1..303e371 100644 --- a/resources/js/Pages/Dashboard.vue +++ b/resources/js/Pages/Dashboard.vue @@ -1,7 +1,7 @@ diff --git a/resources/js/Pages/VacationRequest/Create.vue b/resources/js/Pages/VacationRequest/Create.vue index 4575a21..9da43f1 100644 --- a/resources/js/Pages/VacationRequest/Create.vue +++ b/resources/js/Pages/VacationRequest/Create.vue @@ -1,25 +1,25 @@