-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
46 changed files
with
10,310 additions
and
4,815 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules | ||
./vendor | ||
./public | ||
./public/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
module.exports = { | ||
extends: ["eslint:recommended", "plugin:vue/vue3-recommended", "prettier"], | ||
plugins: ["unused-imports"], | ||
rules: { | ||
"vue/component-tags-order": [ | ||
"error", | ||
{ | ||
order: ["script", "template", "style"], | ||
}, | ||
], | ||
"vue/multi-word-component-names": "off", | ||
"vue/component-api-style": ["error", ["script-setup", "composition"]], | ||
"vue/component-name-in-template-casing": "error", | ||
"vue/define-macros-order": [ | ||
"warn", | ||
{ | ||
order: ["defineProps", "defineEmits"], | ||
}, | ||
], | ||
"vue/define-emits-declaration": ["error", "type-based"], | ||
"vue/define-props-declaration": ["error", "type-based"], | ||
"vue/match-component-import-name": "error", | ||
"vue/no-ref-object-destructure": "error", | ||
"vue/no-unused-refs": "error", | ||
"vue/no-useless-v-bind": "error", | ||
"vue/padding-line-between-tags": "warn", | ||
"vue/prefer-separate-static-class": "error", | ||
"vue/prefer-true-attribute-shorthand": "error", | ||
"vue/no-v-html": "off", | ||
|
||
"no-undef": "off", | ||
"no-unused-vars": "off", | ||
"no-console": ["warn"], | ||
}, | ||
parser: "vue-eslint-parser", | ||
parserOptions: { | ||
ecmaVersion: 2021, | ||
sourceType: "module", | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
shamefully-hoist=true |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Enums; | ||
|
||
enum NotificationType: string | ||
{ | ||
case SUCCESS = 'success'; | ||
case ERROR = 'error'; | ||
case WARNING = 'warning'; | ||
case INFO = 'info'; | ||
case DEFAULT = 'default'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
namespace App\Providers; | ||
|
||
use App\Enums\NotificationType; | ||
use Illuminate\Http\RedirectResponse; | ||
use Illuminate\Support\ServiceProvider; | ||
|
||
class InertiaServiceProvider extends ServiceProvider | ||
{ | ||
public function register(): void | ||
{ | ||
RedirectResponse::macro('flash', function (NotificationType $type, string $body) { | ||
session()->flash('notification', [ | ||
'type' => $type, | ||
'body' => $body, | ||
]); | ||
|
||
/** @var RedirectResponse $this */ | ||
return $this; | ||
}); | ||
|
||
RedirectResponse::macro('success', function (string $body) { | ||
/** @var RedirectResponse $this */ | ||
return $this->flash(NotificationType::SUCCESS, $body); | ||
}); | ||
|
||
RedirectResponse::macro('error', function (string $body) { | ||
/** @var RedirectResponse $this */ | ||
return $this->flash(NotificationType::ERROR, $body); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<?php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.