feat: delete quotes/fix mobile view/models
This commit is contained in:
parent
94e719d5f3
commit
5d73183787
1
.gitignore
vendored
1
.gitignore
vendored
@ -20,3 +20,4 @@ yarn-error.log
|
||||
/.phpstorm.meta.php
|
||||
/_ide_helper.php
|
||||
/_ide_helper_models.php
|
||||
vite.config.js
|
||||
|
||||
@ -12,11 +12,12 @@ class Quote extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
public function request()
|
||||
public function request(): void
|
||||
{
|
||||
// Send the notification
|
||||
// If success, add it to the transactions
|
||||
}
|
||||
|
||||
protected $fillable = [
|
||||
'quote',
|
||||
];
|
||||
|
||||
104
composer.lock
generated
104
composer.lock
generated
@ -367,16 +367,16 @@
|
||||
},
|
||||
{
|
||||
"name": "egulias/email-validator",
|
||||
"version": "4.0.1",
|
||||
"version": "4.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/egulias/EmailValidator.git",
|
||||
"reference": "3a85486b709bc384dae8eb78fb2eec649bdb64ff"
|
||||
"reference": "ebaaf5be6c0286928352e054f2d5125608e5405e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/3a85486b709bc384dae8eb78fb2eec649bdb64ff",
|
||||
"reference": "3a85486b709bc384dae8eb78fb2eec649bdb64ff",
|
||||
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ebaaf5be6c0286928352e054f2d5125608e5405e",
|
||||
"reference": "ebaaf5be6c0286928352e054f2d5125608e5405e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -385,8 +385,8 @@
|
||||
"symfony/polyfill-intl-idn": "^1.26"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^9.5.27",
|
||||
"vimeo/psalm": "^4.30"
|
||||
"phpunit/phpunit": "^10.2",
|
||||
"vimeo/psalm": "^5.12"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation"
|
||||
@ -422,7 +422,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/egulias/EmailValidator/issues",
|
||||
"source": "https://github.com/egulias/EmailValidator/tree/4.0.1"
|
||||
"source": "https://github.com/egulias/EmailValidator/tree/4.0.2"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -430,7 +430,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2023-01-14T14:17:03+00:00"
|
||||
"time": "2023-10-06T06:47:41+00:00"
|
||||
},
|
||||
{
|
||||
"name": "fruitcake/php-cors",
|
||||
@ -1612,16 +1612,16 @@
|
||||
},
|
||||
{
|
||||
"name": "league/flysystem",
|
||||
"version": "3.16.0",
|
||||
"version": "3.17.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/flysystem.git",
|
||||
"reference": "4fdf372ca6b63c6e281b1c01a624349ccb757729"
|
||||
"reference": "bd4c9b26849d82364119c68429541f1631fba94b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/4fdf372ca6b63c6e281b1c01a624349ccb757729",
|
||||
"reference": "4fdf372ca6b63c6e281b1c01a624349ccb757729",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/bd4c9b26849d82364119c68429541f1631fba94b",
|
||||
"reference": "bd4c9b26849d82364119c68429541f1631fba94b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1639,8 +1639,8 @@
|
||||
"symfony/http-client": "<5.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"async-aws/s3": "^1.5",
|
||||
"async-aws/simple-s3": "^1.1",
|
||||
"async-aws/s3": "^1.5 || ^2.0",
|
||||
"async-aws/simple-s3": "^1.1 || ^2.0",
|
||||
"aws/aws-sdk-php": "^3.220.0",
|
||||
"composer/semver": "^3.0",
|
||||
"ext-fileinfo": "*",
|
||||
@ -1686,7 +1686,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/thephpleague/flysystem/issues",
|
||||
"source": "https://github.com/thephpleague/flysystem/tree/3.16.0"
|
||||
"source": "https://github.com/thephpleague/flysystem/tree/3.17.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1698,7 +1698,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2023-09-07T19:22:17+00:00"
|
||||
"time": "2023-10-05T20:15:05+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/flysystem-local",
|
||||
@ -2171,16 +2171,16 @@
|
||||
},
|
||||
{
|
||||
"name": "nette/schema",
|
||||
"version": "v1.2.4",
|
||||
"version": "v1.2.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nette/schema.git",
|
||||
"reference": "c9ff517a53903b3d4e29ec547fb20feecb05b8ab"
|
||||
"reference": "0462f0166e823aad657c9224d0f849ecac1ba10a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nette/schema/zipball/c9ff517a53903b3d4e29ec547fb20feecb05b8ab",
|
||||
"reference": "c9ff517a53903b3d4e29ec547fb20feecb05b8ab",
|
||||
"url": "https://api.github.com/repos/nette/schema/zipball/0462f0166e823aad657c9224d0f849ecac1ba10a",
|
||||
"reference": "0462f0166e823aad657c9224d0f849ecac1ba10a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2227,9 +2227,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/nette/schema/issues",
|
||||
"source": "https://github.com/nette/schema/tree/v1.2.4"
|
||||
"source": "https://github.com/nette/schema/tree/v1.2.5"
|
||||
},
|
||||
"time": "2023-08-05T18:56:25+00:00"
|
||||
"time": "2023-10-05T20:37:59+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nette/utils",
|
||||
@ -5921,16 +5921,16 @@
|
||||
},
|
||||
{
|
||||
"name": "brianium/paratest",
|
||||
"version": "v7.2.8",
|
||||
"version": "v7.2.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/paratestphp/paratest.git",
|
||||
"reference": "882b02d197328138686bb06ce7d8cbb98fc0a16c"
|
||||
"reference": "1f9e41c0779be4540654d92a9314016713f5e62c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/paratestphp/paratest/zipball/882b02d197328138686bb06ce7d8cbb98fc0a16c",
|
||||
"reference": "882b02d197328138686bb06ce7d8cbb98fc0a16c",
|
||||
"url": "https://api.github.com/repos/paratestphp/paratest/zipball/1f9e41c0779be4540654d92a9314016713f5e62c",
|
||||
"reference": "1f9e41c0779be4540654d92a9314016713f5e62c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -5938,13 +5938,13 @@
|
||||
"ext-pcre": "*",
|
||||
"ext-reflection": "*",
|
||||
"ext-simplexml": "*",
|
||||
"fidry/cpu-core-counter": "^0.4.1 || ^0.5.1",
|
||||
"fidry/cpu-core-counter": "^0.5.1",
|
||||
"jean85/pretty-package-versions": "^2.0.5",
|
||||
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
|
||||
"phpunit/php-code-coverage": "^10.1.3",
|
||||
"phpunit/php-file-iterator": "^4.0.2",
|
||||
"phpunit/php-code-coverage": "^10.1.7",
|
||||
"phpunit/php-file-iterator": "^4.1.0",
|
||||
"phpunit/php-timer": "^6.0",
|
||||
"phpunit/phpunit": "^10.3.2",
|
||||
"phpunit/phpunit": "^10.4.0",
|
||||
"sebastian/environment": "^6.0.1",
|
||||
"symfony/console": "^6.3.4",
|
||||
"symfony/process": "^6.3.4"
|
||||
@ -5953,8 +5953,8 @@
|
||||
"doctrine/coding-standard": "^12.0.0",
|
||||
"ext-pcov": "*",
|
||||
"ext-posix": "*",
|
||||
"infection/infection": "^0.27.0",
|
||||
"phpstan/phpstan": "^1.10.32",
|
||||
"infection/infection": "^0.27.3",
|
||||
"phpstan/phpstan": "^1.10.37",
|
||||
"phpstan/phpstan-deprecation-rules": "^1.1.4",
|
||||
"phpstan/phpstan-phpunit": "^1.3.14",
|
||||
"phpstan/phpstan-strict-rules": "^1.5.1",
|
||||
@ -6000,7 +6000,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/paratestphp/paratest/issues",
|
||||
"source": "https://github.com/paratestphp/paratest/tree/v7.2.8"
|
||||
"source": "https://github.com/paratestphp/paratest/tree/v7.2.9"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -6012,7 +6012,7 @@
|
||||
"type": "paypal"
|
||||
}
|
||||
],
|
||||
"time": "2023-10-04T13:38:04+00:00"
|
||||
"time": "2023-10-06T07:53:04+00:00"
|
||||
},
|
||||
{
|
||||
"name": "composer/class-map-generator",
|
||||
@ -7244,35 +7244,35 @@
|
||||
},
|
||||
{
|
||||
"name": "pestphp/pest",
|
||||
"version": "v2.20.0",
|
||||
"version": "v2.21.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/pestphp/pest.git",
|
||||
"reference": "a8b785f69e44ae3f902cbf08fe6b79359ba46945"
|
||||
"reference": "2ffafd445d42c8b7b7e1874bde1c29945767a49d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/pestphp/pest/zipball/a8b785f69e44ae3f902cbf08fe6b79359ba46945",
|
||||
"reference": "a8b785f69e44ae3f902cbf08fe6b79359ba46945",
|
||||
"url": "https://api.github.com/repos/pestphp/pest/zipball/2ffafd445d42c8b7b7e1874bde1c29945767a49d",
|
||||
"reference": "2ffafd445d42c8b7b7e1874bde1c29945767a49d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"brianium/paratest": "^7.2.7",
|
||||
"brianium/paratest": "^7.2.9",
|
||||
"nunomaduro/collision": "^7.9.0",
|
||||
"nunomaduro/termwind": "^1.15.1",
|
||||
"pestphp/pest-plugin": "^2.1.1",
|
||||
"pestphp/pest-plugin-arch": "^2.3.3",
|
||||
"php": "^8.1.0",
|
||||
"phpunit/phpunit": "^10.3.5"
|
||||
"phpunit/phpunit": "^10.4.0"
|
||||
},
|
||||
"conflict": {
|
||||
"phpunit/phpunit": ">10.3.5",
|
||||
"phpunit/phpunit": ">10.4.0",
|
||||
"sebastian/exporter": "<5.1.0",
|
||||
"webmozart/assert": "<1.11.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"pestphp/pest-dev-tools": "^2.16.0",
|
||||
"pestphp/pest-plugin-type-coverage": "^2.2.0",
|
||||
"pestphp/pest-plugin-type-coverage": "^2.4.0",
|
||||
"symfony/process": "^6.3.4"
|
||||
},
|
||||
"bin": [
|
||||
@ -7331,7 +7331,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/pestphp/pest/issues",
|
||||
"source": "https://github.com/pestphp/pest/tree/v2.20.0"
|
||||
"source": "https://github.com/pestphp/pest/tree/v2.21.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -7343,7 +7343,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2023-09-29T18:05:52+00:00"
|
||||
"time": "2023-10-06T12:33:39+00:00"
|
||||
},
|
||||
{
|
||||
"name": "pestphp/pest-plugin",
|
||||
@ -8197,16 +8197,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "10.3.5",
|
||||
"version": "10.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "747c3b2038f1139e3dcd9886a3f5a948648b7503"
|
||||
"reference": "9784e877e3700de37475545bdbdce8383ff53d25"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/747c3b2038f1139e3dcd9886a3f5a948648b7503",
|
||||
"reference": "747c3b2038f1139e3dcd9886a3f5a948648b7503",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9784e877e3700de37475545bdbdce8383ff53d25",
|
||||
"reference": "9784e877e3700de37475545bdbdce8383ff53d25",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -8246,7 +8246,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "10.3-dev"
|
||||
"dev-main": "10.4-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@ -8278,7 +8278,7 @@
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
||||
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/10.3.5"
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/10.4.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -8294,7 +8294,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2023-09-19T05:42:37+00:00"
|
||||
"time": "2023-10-06T03:41:22+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/cache",
|
||||
@ -9758,5 +9758,5 @@
|
||||
"php": "^8.1"
|
||||
},
|
||||
"platform-dev": [],
|
||||
"plugin-api-version": "2.6.0"
|
||||
"plugin-api-version": "2.3.0"
|
||||
}
|
||||
|
||||
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "html",
|
||||
"name": "priceybot",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"dev": "vite --host",
|
||||
"build": "vite build"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
3
resources/views/components/button.blade.php
Normal file
3
resources/views/components/button.blade.php
Normal file
@ -0,0 +1,3 @@
|
||||
<button {{ $attributes->merge(['type' => 'submit', 'class' => 'inline-flex items-center justify-center px-4 py-2 border border-transparent rounded-md font-bold text-xs text-white tracking-widest focus:outline-none focus:ring-2 focus:ring-nexi-red focus:ring-offset-2 transition ease-in-out duration-150']) }}>
|
||||
{{ $slot }}
|
||||
</button>
|
||||
@ -1,3 +1,3 @@
|
||||
<button {{ $attributes->merge(['type' => 'submit', 'class' => 'inline-flex items-center justify-center px-4 py-2 bg-nexi-red border border-transparent rounded-md font-bold text-xs text-white tracking-widest focus:outline-none focus:ring-2 focus:ring-nexi-red focus:ring-offset-2 transition ease-in-out duration-150']) }}>
|
||||
<button {{ $attributes->merge(['type' => 'submit', 'class' => 'inline-flex items-center justify-center px-4 py-2 border border-transparent rounded-md font-bold text-xs text-white tracking-widest focus:outline-none focus:ring-2 focus:ring-nexi-red focus:ring-offset-2 transition ease-in-out duration-150 bg-nexi-red']) }}>
|
||||
{{ $slot }}
|
||||
</button>
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
<button {{ $attributes->merge(['type' => 'button', 'class' => 'inline-flex items-center px-4 py-2 bg-white dark:bg-nexi-black border border-gray-300 dark:border-gray-500 rounded-md font-semibold text-xs text-gray-700 dark:text-gray-300 uppercase tracking-widest shadow-sm hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 dark:focus:ring-offset-nexi-black disabled:opacity-25 transition ease-in-out duration-150']) }}>
|
||||
<button {{ $attributes->merge(['type' => 'button', 'class' => 'inline-flex items-center justify-center px-4 py-2 bg-white dark:bg-nexi-black border border-nexi-red rounded-md font-semibold text-xs text-gray-700 dark:text-gray-300 uppercase tracking-widest shadow-sm hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-nexi-red focus:ring-offset-2 dark:focus:ring-offset-nexi-black disabled:opacity-25 transition ease-in-out duration-150']) }}>
|
||||
{{ $slot }}
|
||||
</button>
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
</ul>
|
||||
</ul>
|
||||
</li>
|
||||
@if(auth()->user()->is_admin)
|
||||
<li>
|
||||
<div class="text-xs font-semibold leading-6 text-gray-400">Admin Menu</div>
|
||||
<ul role="list" class="-mx-2 mt-2 space-y-1">
|
||||
@ -46,6 +47,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
}"
|
||||
x-init="$watch('darkMode', val => localStorage.setItem('darkMode', val))"
|
||||
x-bind:class="{'dark': darkMode === 'dark' || (darkMode === 'system' && window.matchMedia('(prefers-color-scheme: dark)').matches)}"
|
||||
class="h-full"
|
||||
>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
@ -21,7 +22,7 @@
|
||||
<!-- Scripts -->
|
||||
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
||||
</head>
|
||||
<body class="antialiased bg-nexi-primary dark:bg-nexi-primary-dark font-sans text-nexi-black transition-colors duration-300">
|
||||
<body class="antialiased bg-nexi-primary dark:bg-nexi-primary-dark font-sans text-nexi-black transition-colors duration-300 h-full">
|
||||
<div x-data="{ sidebarOpen: false }">
|
||||
<div class="relative z-50 lg:hidden" role="dialog" aria-modal="true">
|
||||
{{-- TODO: Look into why the fuck does this not work? mobile views seem to not work with livewire clicks??? --}}
|
||||
@ -32,7 +33,7 @@
|
||||
x-transition:leave="transition-opacity ease-linear duration-300"
|
||||
x-transition:leave-start="opacity-100"
|
||||
x-transition:leave-end="opacity-0"
|
||||
class="fixed inset-0 bg-nexi-black/80"></div>
|
||||
class="fixed inset-0 bg-nexi-black/80">
|
||||
|
||||
<div class="fixed inset-0 flex">
|
||||
<div x-show="sidebarOpen"
|
||||
@ -59,12 +60,13 @@
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="flex grow flex-col gap-y-5 overflow-y-auto px-6 pb-4">
|
||||
<div class="flex grow flex-col gap-y-5 overflow-y-auto px-6 pb-4 bg-nexi-primary dark:bg-nexi-primary-dark">
|
||||
<x-sidebar/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Static sidebar for desktop -->
|
||||
<div class="hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:w-72 lg:flex-col">
|
||||
|
||||
@ -23,7 +23,18 @@ new #[Layout('layouts.guest')] class extends Component
|
||||
// TODO: add code to send a notification
|
||||
}
|
||||
|
||||
public function delete(Quote $quote): void
|
||||
{
|
||||
$this->authorize('request', $quote);
|
||||
|
||||
$quote->delete();
|
||||
|
||||
$this->dispatch('quote-deleted');
|
||||
|
||||
}
|
||||
|
||||
#[On('quote-approved')]
|
||||
#[On('quote-deleted')]
|
||||
public function getQuotes(): void
|
||||
{
|
||||
$this->quotes = Quote::all()->whereNull('deleted_at')->sortDesc();
|
||||
@ -54,8 +65,40 @@ new #[Layout('layouts.guest')] class extends Component
|
||||
<td class="relative w-8 pl-4 pr-3 text-sm sm:pl-6 border-t">
|
||||
<div class="flex flex-row space-x-2">
|
||||
<form wire:submit="request({{ $quote }})">
|
||||
<x-primary-button wire:loading.attr="disabled" wire:loading.class="opacity-50" class="bg-nexi-purple w-24">{{ __('Request') }}</x-primary-button>
|
||||
<x-button wire:loading.attr="disabled" wire:loading.class="opacity-50" class="bg-nexi-purple w-24">{{ __('Request') }}</x-button>
|
||||
</form>
|
||||
@if(auth()->user()->is_admin)
|
||||
<x-button
|
||||
x-data=""
|
||||
x-on:click.prevent="$dispatch('open-modal', 'confirm-quote-deletion-{{ $quote->id }}')"
|
||||
wire:loading.attr="disabled"
|
||||
wire:loading.class="opacity-50"
|
||||
class="bg-nexi-red w-24"
|
||||
>{{ __('Delete') }}</x-button>
|
||||
|
||||
<x-modal name="confirm-quote-deletion-{{ $quote->id }}" :show="$errors->isNotEmpty()" focusable>
|
||||
<form wire:submit="delete({{ $quote }})" class="p-6">
|
||||
<h2 class="text-lg font-medium text-nexi-black dark:text-gray-100">
|
||||
{{ __('Are you sure you want to delete the quote?') }}
|
||||
</h2>
|
||||
|
||||
<p class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
||||
"{{ $quote->quote }}"
|
||||
</p>
|
||||
|
||||
<div class="mt-6 flex justify-end">
|
||||
<x-secondary-button x-on:click="$dispatch('close')">
|
||||
{{ __('Cancel') }}
|
||||
</x-secondary-button>
|
||||
<x-primary-button
|
||||
wire:loading.attr="disabled"
|
||||
wire:loading.class="opacity-50"
|
||||
class="w-24 ml-3"
|
||||
>{{ __('Delete') }}</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
</x-modal>
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
@endif
|
||||
|
||||
@ -35,6 +35,6 @@ new #[Layout('layouts.guest')] class extends Component
|
||||
></x-text-input>
|
||||
|
||||
<x-input-error :messages="$errors->get('quote')" class="mt-2"/>
|
||||
<x-primary-button wire:loading.attr="disabled" wire:loading.class="opacity-50" class="mt-4">{{ __('Request') }}</x-primary-button>
|
||||
<x-button wire:loading.attr="disabled" wire:loading.class="opacity-50" class="bg-nexi-red mt-4">{{ __('Request') }}</x-button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@ -69,12 +69,67 @@ new #[Layout('layouts.guest')] class extends Component
|
||||
@if(!empty(auth()->user()) && auth()->user()->is_admin)
|
||||
<td class="relative w-8 pl-4 pr-3 text-sm sm:pl-6 border-t">
|
||||
<div class="flex flex-row space-x-2">
|
||||
<form wire:submit="approve({{ $quote }})">
|
||||
<x-primary-button wire:loading.attr="disabled" wire:loading.class="opacity-50" class="bg-nexi-green w-24">{{ __('Approve') }}</x-primary-button>
|
||||
<x-button
|
||||
x-data=""
|
||||
x-on:click.prevent="$dispatch('open-modal', 'confirm-quote-approve-{{ $quote->id }}')"
|
||||
wire:loading.attr="disabled"
|
||||
wire:loading.class="opacity-50"
|
||||
class="bg-nexi-green w-24"
|
||||
>{{ __('Approve') }}</x-button>
|
||||
|
||||
<x-modal name="confirm-quote-approve-{{ $quote->id }}" :show="$errors->isNotEmpty()" focusable>
|
||||
<form wire:submit="approve({{ $quote }})" class="p-6">
|
||||
<h2 class="text-lg font-medium text-nexi-black dark:text-gray-100">
|
||||
{{ __('Are you sure you want to approve the quote?') }}
|
||||
</h2>
|
||||
|
||||
<p class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
||||
"{{ $quote->quote }}"
|
||||
</p>
|
||||
|
||||
<div class="mt-6 flex justify-end">
|
||||
<x-secondary-button x-on:click="$dispatch('close')">
|
||||
{{ __('Cancel') }}
|
||||
</x-secondary-button>
|
||||
<x-button
|
||||
wire:loading.attr="disabled"
|
||||
wire:loading.class="opacity-50"
|
||||
class="bg-nexi-green w-24 ml-3"
|
||||
>{{ __('Approve') }}</x-button>
|
||||
</div>
|
||||
</form>
|
||||
<form wire:submit="reject({{ $quote }})">
|
||||
<x-primary-button wire:loading.attr="disabled" wire:loading.class="opacity-50" class="bg-nexi-red w-24">{{ __('Reject') }}</x-primary-button>
|
||||
</x-modal>
|
||||
|
||||
<x-button
|
||||
x-data=""
|
||||
x-on:click.prevent="$dispatch('open-modal', 'confirm-quote-reject-{{ $quote->id }}')"
|
||||
wire:loading.attr="disabled"
|
||||
wire:loading.class="opacity-50"
|
||||
class="bg-nexi-red w-24"
|
||||
>{{ __('Reject') }}</x-button>
|
||||
|
||||
<x-modal name="confirm-quote-reject-{{ $quote->id }}" :show="$errors->isNotEmpty()" focusable>
|
||||
<form wire:submit="reject({{ $quote }})" class="p-6">
|
||||
<h2 class="text-lg font-medium text-nexi-black dark:text-gray-100">
|
||||
{{ __('Are you sure you want to reject the quote?') }}
|
||||
</h2>
|
||||
|
||||
<p class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
||||
"{{ $quote->quote }}"
|
||||
</p>
|
||||
|
||||
<div class="mt-6 flex justify-end">
|
||||
<x-secondary-button x-on:click="$dispatch('close')">
|
||||
{{ __('Cancel') }}
|
||||
</x-secondary-button>
|
||||
<x-button
|
||||
wire:loading.attr="disabled"
|
||||
wire:loading.class="opacity-50"
|
||||
class="bg-nexi-red w-24 ml-3"
|
||||
>{{ __('Reject') }}</x-button>
|
||||
</div>
|
||||
</form>
|
||||
</x-modal>
|
||||
</div>
|
||||
</td>
|
||||
@endif
|
||||
|
||||
@ -7,11 +7,11 @@
|
||||
|
||||
<div class="py-12">
|
||||
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8 space-y-6">
|
||||
<div class="p-4 sm:p-8 shadow sm:rounded-lg dark:shadow-zinc-600">
|
||||
<div class="max-w-xl">
|
||||
<livewire:profile.update-profile-information-form />
|
||||
</div>
|
||||
</div>
|
||||
{{-- <div class="p-4 sm:p-8 shadow sm:rounded-lg dark:shadow-zinc-600">--}}
|
||||
{{-- <div class="max-w-xl">--}}
|
||||
{{-- <livewire:profile.update-profile-information-form />--}}
|
||||
{{-- </div>--}}
|
||||
{{-- </div>--}}
|
||||
|
||||
<div class="p-4 sm:p-8 shadow sm:rounded-lg dark:shadow-zinc-600">
|
||||
<div class="max-w-xl">
|
||||
@ -19,11 +19,11 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="p-4 sm:p-8 shadow sm:rounded-lg dark:shadow-zinc-600">
|
||||
<div class="max-w-xl">
|
||||
<livewire:profile.delete-user-form />
|
||||
</div>
|
||||
</div>
|
||||
{{-- <div class="p-4 sm:p-8 shadow sm:rounded-lg dark:shadow-zinc-600">--}}
|
||||
{{-- <div class="max-w-xl">--}}
|
||||
{{-- <livewire:profile.delete-user-form />--}}
|
||||
{{-- </div>--}}
|
||||
{{-- </div>--}}
|
||||
</div>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
|
||||
@ -1,19 +0,0 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import laravel from 'laravel-vite-plugin';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
laravel({
|
||||
input: [
|
||||
'resources/css/app.css',
|
||||
'resources/js/app.js',
|
||||
],
|
||||
refresh: true,
|
||||
}),
|
||||
],
|
||||
server: {
|
||||
hmr: {
|
||||
host: '192.168.1.71',
|
||||
},
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user