From 117ed6cfdc745eaf68788a901cd912faeabf3d07 Mon Sep 17 00:00:00 2001 From: Romulus21 Date: Sat, 1 Aug 2020 16:27:09 +0200 Subject: [PATCH 1/2] fix checked input status after move --- resources/js/views/ToDoLists/ToDo.vue | 28 +++++++++++-------- resources/js/views/ToDoLists/ToDoListShow.vue | 8 ++++-- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/resources/js/views/ToDoLists/ToDo.vue b/resources/js/views/ToDoLists/ToDo.vue index eae126f..d4c309e 100644 --- a/resources/js/views/ToDoLists/ToDo.vue +++ b/resources/js/views/ToDoLists/ToDo.vue @@ -42,6 +42,7 @@ export default { }, data () { return { + id: this.toDo.data.to_do_id, edit: false, checked: !!(this.toDo.data.attributes.data.checked_at), } @@ -52,7 +53,6 @@ export default { axios.patch('/api/to-do-lists/' + this.idList + '/to-do/' + this.toDo.data.to_do_id, {name: this.toDo.data.attributes.data.name }) .then(() => { this.edit = false - //this.toDoList.data.attributes.data.name = this.listName }) .catch(errorRes => { console.log('Internal Error, Unable to delete list.' + errorRes) @@ -61,16 +61,22 @@ export default { }, watch: { checked: function () { - // eslint-disable-next-line no-undef - axios.patch('/api/to-do-lists/' + this.idList + '/to-do/' + this.toDo.data.to_do_id + '/check') - .then(res => { - // this.toDoList.data.attributes.data.to_dos.data[position].data.attributes.data.checked_at = res.data.data.attributes.data.checked_at - this.toDo.data.attributes.data.checked_at = res.data.data.attributes.data.checked_at - this.checked = !!(res.data.data.attributes.data.checked_at) - }) - .catch(errorRes => { - console.log('Internal Error, Unable to delete contact.' + errorRes) - }) + if(event && event.type === 'click') { + // eslint-disable-next-line no-undef + axios.patch('/api/to-do-lists/' + this.idList + '/to-do/' + this.toDo.data.to_do_id + '/check') + .then(res => { + this.toDo.data.attributes.data.checked_at = res.data.data.attributes.data.checked_at + this.checked = !!(res.data.data.attributes.data.checked_at) + }) + .catch(errorRes => { + console.log('Internal Error, Unable to delete contact.' + errorRes) + }) + } + }, + toDo: function () { + if(this.checked !== !!(this.toDo.data.attributes.data.checked_at)) { + this.checked = !!(this.toDo.data.attributes.data.checked_at) + } } } } diff --git a/resources/js/views/ToDoLists/ToDoListShow.vue b/resources/js/views/ToDoLists/ToDoListShow.vue index 164c1ef..c3d3b6d 100644 --- a/resources/js/views/ToDoLists/ToDoListShow.vue +++ b/resources/js/views/ToDoLists/ToDoListShow.vue @@ -43,6 +43,7 @@ @@ -87,7 +88,7 @@ export default { this.toDoList = res.data this.loading = false this.listName = res.data.data.attributes.data.name - this.reorderList() + this.sortList() }) .catch(errorRes => { this.loading = false @@ -120,11 +121,14 @@ export default { console.log('Internal Error, Unable to delete contact.' + errorRes) }) }, - reorderList() { + sortList() { this.toDoList.data.attributes.data.to_dos.data.sort(function(a, b) { return a.data.attributes.data.order - b.data.attributes.data.order }) }, + reorderList() { + this.sortList() + }, addToDo: function () { if(this.toDoName.length >= 3) { // eslint-disable-next-line no-undef From f91eff1cccd5fdc3eb244ebef16313e853e8942d Mon Sep 17 00:00:00 2001 From: Romulus21 Date: Sat, 1 Aug 2020 16:37:52 +0200 Subject: [PATCH 2/2] fix auth css & update composer & npm --- composer.lock | 14 ++-- package.json | 2 +- resources/views/auth/login.blade.php | 8 +- .../views/auth/passwords/email.blade.php | 15 ++-- resources/views/auth/register.blade.php | 77 ------------------- 5 files changed, 20 insertions(+), 96 deletions(-) delete mode 100644 resources/views/auth/register.blade.php diff --git a/composer.lock b/composer.lock index ddc0a89..ed47b61 100644 --- a/composer.lock +++ b/composer.lock @@ -2905,16 +2905,16 @@ }, { "name": "ramsey/uuid", - "version": "4.0.1", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "ba8fff1d3abb8bb4d35a135ed22a31c6ef3ede3d" + "reference": "988dbefc7878d0a35f12afb4df1f7dd0bd153c43" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/ba8fff1d3abb8bb4d35a135ed22a31c6ef3ede3d", - "reference": "ba8fff1d3abb8bb4d35a135ed22a31c6ef3ede3d", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/988dbefc7878d0a35f12afb4df1f7dd0bd153c43", + "reference": "988dbefc7878d0a35f12afb4df1f7dd0bd153c43", "shasum": "" }, "require": { @@ -2929,7 +2929,7 @@ }, "require-dev": { "codeception/aspect-mock": "^3", - "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2", + "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7.0", "doctrine/annotations": "^1.8", "goaop/framework": "^2", "mockery/mockery": "^1.3", @@ -2938,8 +2938,8 @@ "php-mock/php-mock-mockery": "^1.3", "php-mock/php-mock-phpunit": "^2.5", "php-parallel-lint/php-parallel-lint": "^1.1", + "phpbench/phpbench": "^0.17.1", "phpstan/extension-installer": "^1.0", - "phpstan/phpdoc-parser": "0.4.3", "phpstan/phpstan": "^0.12", "phpstan/phpstan-mockery": "^0.12", "phpstan/phpstan-phpunit": "^0.12", @@ -2988,7 +2988,7 @@ "type": "github" } ], - "time": "2020-03-29T20:13:32+00:00" + "time": "2020-07-28T16:51:01+00:00" }, { "name": "swiftmailer/swiftmailer", diff --git a/package.json b/package.json index 13bd4de..c908d3b 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,6 @@ "laravel-mix-svg-vue": "^0.2.6", "markdown-it": "^10.0.0", "markdown-it-checkbox": "^1.1.0", - "tailwindcss": "^1.5.2" + "tailwindcss": "^1.6.0" } } diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index 426f9f6..c26ecf6 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -1,15 +1,15 @@ @extends('layouts.app') @section('content') -
-
+
+
{{ __('Login') }}
@csrf
- + @error('email') {{ $message }} @@ -19,7 +19,7 @@
- + @error('password') diff --git a/resources/views/auth/passwords/email.blade.php b/resources/views/auth/passwords/email.blade.php index 8cae861..30fe933 100644 --- a/resources/views/auth/passwords/email.blade.php +++ b/resources/views/auth/passwords/email.blade.php @@ -1,11 +1,11 @@ @extends('layouts.app') @section('content') -
-
{{ __('Reset Password') }}
+
+
+
{{ __('Reset Password') }}
-
@if (session('status')) @endsection diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php deleted file mode 100644 index d236a48..0000000 --- a/resources/views/auth/register.blade.php +++ /dev/null @@ -1,77 +0,0 @@ -@extends('layouts.app') - -@section('content') -
-
-
-
-
{{ __('Register') }}
- -
-
- @csrf - -
- - -
- - - @error('name') - - {{ $message }} - - @enderror -
-
- -
- - -
- - - @error('email') - - {{ $message }} - - @enderror -
-
- -
- - -
- - - @error('password') - - {{ $message }} - - @enderror -
-
- -
- - -
- -
-
- -
-
- -
-
-
-
-
-
-
-
-@endsection