This commit is contained in:
2024-10-01 19:07:23 +05:00
parent 9fecfccf22
commit 4dde4b357a
26 changed files with 26396 additions and 262 deletions

View File

@@ -0,0 +1,22 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Http;
class FetchCardHistoryController extends Controller
{
public function index()
{
$response = Http::withBody('{
"idSeria": "I-AS",
"idNo": "314567",
"clientType":"recipient",
"cardMaskNumber":"993403******3258",
"expDate": "07/49"
}')->acceptJson()->post('http://10.3.158.102:9999/api/clientinfo');
return $response->body();
}
}

View File

@@ -3,6 +3,7 @@
namespace App\Nova\Resources\Order\Loan;
use App\Modules\DateHelper\Repositories\DateHelperRepository;
use App\Nova\Forms\NovaForm;
use App\Nova\Resources\Branch\Branch;
use App\Nova\Resources\System\Location\Province;
use App\Nova\User;
@@ -22,6 +23,7 @@ use Laravel\Nova\Fields\Number;
use Laravel\Nova\Fields\Select;
use Laravel\Nova\Fields\Text;
use Laravel\Nova\Panel;
use Nurmuhammet\NovaCustomHtml\NovaCustomHtml;
use Nurmuhammet\NovaInputmask\NovaInputmask;
class LoanOrderMobileFieldsForDetail
@@ -89,19 +91,11 @@ class LoanOrderMobileFieldsForDetail
]),
new Panel(__('Card'), [
Number::make(__('Card number'), 'card_number'),
Text::make(__('Name on card'), 'card_name'),
Select::make(__('Card').' '.__('Expiration month'), 'card_month')
->displayUsingLabels()
->searchable()
->options(DateHelperRepository::monthsAsNumber()),
Select::make(__('Card').' '.__('Expiration year'), 'card_year')
->displayUsingLabels()
->searchable()
->options(DateHelperRepository::yearsUntil()),
NovaCustomHtml::make(__('Data'), 'card_name')
->html(view('orders.loan.mobile.card-history', [
'resource' => $resource
])->render())
->fillUsing(NovaForm::fillEmpty()),
]),
new Panel(__('Contact data'), [

View File

@@ -146,7 +146,7 @@ class NovaServiceProvider extends NovaApplicationServiceProvider
public function setupAssets(): void
{
Nova::style('additional', resource_path('css/vendor/nova/css/additional.css'));
// Nova::script('additional', resource_path('js/vendor/nova/js/additional.js'));
Nova::script('additional', resource_path('js/vendor/nova/js/additional.js'));
}
/**

View File

@@ -24,7 +24,6 @@
"laravel/tinker": "^2.8",
"maantje/pulse-php-fpm": "^0.2.1",
"morrislaptop/laravel-pulse-4xx": "^0.0.2",
"nurmuhammet/nova-custom-html": "^1.0",
"nurmuhammet/nova-inputmask": "^1.0",
"outl1ne/nova-grid": "@dev",
"outl1ne/nova-simple-repeatable": "^2.2",
@@ -37,7 +36,8 @@
"stepanenko3/nova-logs-tool": "^2.1",
"stevebauman/location": "^7.1",
"symfony/filesystem": "^7.0",
"trin4ik/nova-switcher": "^0.4.0"
"trin4ik/nova-switcher": "^0.4.0",
"nurmuhammet/nova-custom-html": "@dev"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",
@@ -98,6 +98,10 @@
"1": {
"type": "vcs",
"url": "https://github.com/nurmuhammet-ali/nova-tabs"
},
"2": {
"type": "path",
"url": "./nova-components/NovaCustomHtml"
}
},
"config": {

208
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "68508766b98f10cf8e0c0188d45a572e",
"content-hash": "c05733283084ea873c08ebc05828256d",
"packages": [
{
"name": "adoy/fastcgi-client",
@@ -236,16 +236,16 @@
},
{
"name": "composer/ca-bundle",
"version": "1.5.1",
"version": "1.5.2",
"source": {
"type": "git",
"url": "https://github.com/composer/ca-bundle.git",
"reference": "063d9aa8696582f5a41dffbbaf3c81024f0a604a"
"reference": "48a792895a2b7a6ee65dd5442c299d7b835b6137"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/063d9aa8696582f5a41dffbbaf3c81024f0a604a",
"reference": "063d9aa8696582f5a41dffbbaf3c81024f0a604a",
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/48a792895a2b7a6ee65dd5442c299d7b835b6137",
"reference": "48a792895a2b7a6ee65dd5442c299d7b835b6137",
"shasum": ""
},
"require": {
@@ -255,8 +255,8 @@
},
"require-dev": {
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^8 || ^9",
"psr/log": "^1.0 || ^2.0 || ^3.0",
"symfony/phpunit-bridge": "^4.2 || ^5",
"symfony/process": "^4.0 || ^5.0 || ^6.0 || ^7.0"
},
"type": "library",
@@ -292,7 +292,7 @@
"support": {
"irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/ca-bundle/issues",
"source": "https://github.com/composer/ca-bundle/tree/1.5.1"
"source": "https://github.com/composer/ca-bundle/tree/1.5.2"
},
"funding": [
{
@@ -308,7 +308,7 @@
"type": "tidelift"
}
],
"time": "2024-07-08T15:28:20+00:00"
"time": "2024-09-25T07:49:53+00:00"
},
{
"name": "composer/semver",
@@ -393,16 +393,16 @@
},
{
"name": "dedoc/scramble",
"version": "v0.11.15",
"version": "v0.11.16",
"source": {
"type": "git",
"url": "https://github.com/dedoc/scramble.git",
"reference": "24dd5810b4d514b67265e5e0ceaedab54c70870c"
"reference": "e44fff18ccaa101f58688e53c0725cbc772ef0e7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/dedoc/scramble/zipball/24dd5810b4d514b67265e5e0ceaedab54c70870c",
"reference": "24dd5810b4d514b67265e5e0ceaedab54c70870c",
"url": "https://api.github.com/repos/dedoc/scramble/zipball/e44fff18ccaa101f58688e53c0725cbc772ef0e7",
"reference": "e44fff18ccaa101f58688e53c0725cbc772ef0e7",
"shasum": ""
},
"require": {
@@ -456,7 +456,7 @@
],
"support": {
"issues": "https://github.com/dedoc/scramble/issues",
"source": "https://github.com/dedoc/scramble/tree/v0.11.15"
"source": "https://github.com/dedoc/scramble/tree/v0.11.16"
},
"funding": [
{
@@ -464,7 +464,7 @@
"type": "github"
}
],
"time": "2024-09-22T13:16:29+00:00"
"time": "2024-09-24T06:34:39+00:00"
},
{
"name": "denniseilander/pulse-about-application",
@@ -2682,16 +2682,16 @@
},
{
"name": "laravel/pint",
"version": "v1.17.3",
"version": "v1.18.1",
"source": {
"type": "git",
"url": "https://github.com/laravel/pint.git",
"reference": "9d77be916e145864f10788bb94531d03e1f7b482"
"reference": "35c00c05ec43e6b46d295efc0f4386ceb30d50d9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/pint/zipball/9d77be916e145864f10788bb94531d03e1f7b482",
"reference": "9d77be916e145864f10788bb94531d03e1f7b482",
"url": "https://api.github.com/repos/laravel/pint/zipball/35c00c05ec43e6b46d295efc0f4386ceb30d50d9",
"reference": "35c00c05ec43e6b46d295efc0f4386ceb30d50d9",
"shasum": ""
},
"require": {
@@ -2744,7 +2744,7 @@
"issues": "https://github.com/laravel/pint/issues",
"source": "https://github.com/laravel/pint"
},
"time": "2024-09-03T15:00:28+00:00"
"time": "2024-09-24T17:22:50+00:00"
},
{
"name": "laravel/prompts",
@@ -2959,16 +2959,16 @@
},
{
"name": "laravel/serializable-closure",
"version": "v1.3.4",
"version": "v1.3.5",
"source": {
"type": "git",
"url": "https://github.com/laravel/serializable-closure.git",
"reference": "61b87392d986dc49ad5ef64e75b1ff5fee24ef81"
"reference": "1dc4a3dbfa2b7628a3114e43e32120cce7cdda9c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/serializable-closure/zipball/61b87392d986dc49ad5ef64e75b1ff5fee24ef81",
"reference": "61b87392d986dc49ad5ef64e75b1ff5fee24ef81",
"url": "https://api.github.com/repos/laravel/serializable-closure/zipball/1dc4a3dbfa2b7628a3114e43e32120cce7cdda9c",
"reference": "1dc4a3dbfa2b7628a3114e43e32120cce7cdda9c",
"shasum": ""
},
"require": {
@@ -3016,20 +3016,20 @@
"issues": "https://github.com/laravel/serializable-closure/issues",
"source": "https://github.com/laravel/serializable-closure"
},
"time": "2024-08-02T07:48:17+00:00"
"time": "2024-09-23T13:33:08+00:00"
},
{
"name": "laravel/tinker",
"version": "v2.9.0",
"version": "v2.10.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/tinker.git",
"reference": "502e0fe3f0415d06d5db1f83a472f0f3b754bafe"
"reference": "ba4d51eb56de7711b3a37d63aa0643e99a339ae5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/tinker/zipball/502e0fe3f0415d06d5db1f83a472f0f3b754bafe",
"reference": "502e0fe3f0415d06d5db1f83a472f0f3b754bafe",
"url": "https://api.github.com/repos/laravel/tinker/zipball/ba4d51eb56de7711b3a37d63aa0643e99a339ae5",
"reference": "ba4d51eb56de7711b3a37d63aa0643e99a339ae5",
"shasum": ""
},
"require": {
@@ -3080,9 +3080,9 @@
],
"support": {
"issues": "https://github.com/laravel/tinker/issues",
"source": "https://github.com/laravel/tinker/tree/v2.9.0"
"source": "https://github.com/laravel/tinker/tree/v2.10.0"
},
"time": "2024-01-04T16:10:04+00:00"
"time": "2024-09-23T13:32:56+00:00"
},
{
"name": "laravel/ui",
@@ -3337,16 +3337,16 @@
},
{
"name": "league/flysystem",
"version": "3.28.0",
"version": "3.29.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/flysystem.git",
"reference": "e611adab2b1ae2e3072fa72d62c62f52c2bf1f0c"
"reference": "0adc0d9a51852e170e0028a60bd271726626d3f0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/e611adab2b1ae2e3072fa72d62c62f52c2bf1f0c",
"reference": "e611adab2b1ae2e3072fa72d62c62f52c2bf1f0c",
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/0adc0d9a51852e170e0028a60bd271726626d3f0",
"reference": "0adc0d9a51852e170e0028a60bd271726626d3f0",
"shasum": ""
},
"require": {
@@ -3414,22 +3414,22 @@
],
"support": {
"issues": "https://github.com/thephpleague/flysystem/issues",
"source": "https://github.com/thephpleague/flysystem/tree/3.28.0"
"source": "https://github.com/thephpleague/flysystem/tree/3.29.0"
},
"time": "2024-05-22T10:09:12+00:00"
"time": "2024-09-29T11:59:11+00:00"
},
{
"name": "league/flysystem-local",
"version": "3.28.0",
"version": "3.29.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/flysystem-local.git",
"reference": "13f22ea8be526ea58c2ddff9e158ef7c296e4f40"
"reference": "e0e8d52ce4b2ed154148453d321e97c8e931bd27"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/13f22ea8be526ea58c2ddff9e158ef7c296e4f40",
"reference": "13f22ea8be526ea58c2ddff9e158ef7c296e4f40",
"url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/e0e8d52ce4b2ed154148453d321e97c8e931bd27",
"reference": "e0e8d52ce4b2ed154148453d321e97c8e931bd27",
"shasum": ""
},
"require": {
@@ -3463,9 +3463,9 @@
"local"
],
"support": {
"source": "https://github.com/thephpleague/flysystem-local/tree/3.28.0"
"source": "https://github.com/thephpleague/flysystem-local/tree/3.29.0"
},
"time": "2024-05-06T20:05:52+00:00"
"time": "2024-08-09T21:24:39+00:00"
},
{
"name": "league/mime-type-detection",
@@ -4343,16 +4343,16 @@
},
{
"name": "nikic/php-parser",
"version": "v5.2.0",
"version": "v5.3.0",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb"
"reference": "3abf7425cd284141dc5d8d14a9ee444de3345d1a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb",
"reference": "23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/3abf7425cd284141dc5d8d14a9ee444de3345d1a",
"reference": "3abf7425cd284141dc5d8d14a9ee444de3345d1a",
"shasum": ""
},
"require": {
@@ -4395,9 +4395,9 @@
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
"source": "https://github.com/nikic/PHP-Parser/tree/v5.2.0"
"source": "https://github.com/nikic/PHP-Parser/tree/v5.3.0"
},
"time": "2024-09-15T16:40:33+00:00"
"time": "2024-09-29T13:56:26+00:00"
},
{
"name": "nova-kit/nova-packages-tool",
@@ -4541,17 +4541,11 @@
},
{
"name": "nurmuhammet/nova-custom-html",
"version": "1.0.10",
"source": {
"type": "git",
"url": "https://github.com/nurmuhammet-ali/nova-custom-html.git",
"reference": "d8d424b54d254f93ff838cb15772c443dfbac8fd"
},
"version": "dev-main",
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nurmuhammet-ali/nova-custom-html/zipball/d8d424b54d254f93ff838cb15772c443dfbac8fd",
"reference": "d8d424b54d254f93ff838cb15772c443dfbac8fd",
"shasum": ""
"type": "path",
"url": "./nova-components/NovaCustomHtml",
"reference": "77e55d81c56c59eca8f4d4a6259f4c6cb52e7898"
},
"require": {
"php": "^7.3|^8.0"
@@ -4569,7 +4563,6 @@
"Nurmuhammet\\NovaCustomHtml\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
@@ -4578,11 +4571,9 @@
"laravel",
"nova"
],
"support": {
"issues": "https://github.com/nurmuhammet-ali/nova-custom-html/issues",
"source": "https://github.com/nurmuhammet-ali/nova-custom-html/tree/1.0.10"
},
"time": "2024-01-26T20:59:45+00:00"
"transport-options": {
"relative": true
}
},
{
"name": "nurmuhammet/nova-inputmask",
@@ -4633,16 +4624,16 @@
},
{
"name": "openspout/openspout",
"version": "v4.24.5",
"version": "v4.26.0",
"source": {
"type": "git",
"url": "https://github.com/openspout/openspout.git",
"reference": "393299ae21153f042f48b185f2adeb4b157d1d93"
"reference": "a49b947c0c109f4fd112f9b5c6d6cb3e6baf8b50"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/openspout/openspout/zipball/393299ae21153f042f48b185f2adeb4b157d1d93",
"reference": "393299ae21153f042f48b185f2adeb4b157d1d93",
"url": "https://api.github.com/repos/openspout/openspout/zipball/a49b947c0c109f4fd112f9b5c6d6cb3e6baf8b50",
"reference": "a49b947c0c109f4fd112f9b5c6d6cb3e6baf8b50",
"shasum": ""
},
"require": {
@@ -4652,17 +4643,17 @@
"ext-libxml": "*",
"ext-xmlreader": "*",
"ext-zip": "*",
"php": "~8.1.0 || ~8.2.0 || ~8.3.0"
"php": "~8.2.0 || ~8.3.0 || ~8.4.0"
},
"require-dev": {
"ext-zlib": "*",
"friendsofphp/php-cs-fixer": "^3.60.0",
"friendsofphp/php-cs-fixer": "^3.64.0",
"infection/infection": "^0.29.6",
"phpbench/phpbench": "^1.3.1",
"phpstan/phpstan": "^1.11.8",
"phpstan/phpstan": "^1.12.4",
"phpstan/phpstan-phpunit": "^1.4.0",
"phpstan/phpstan-strict-rules": "^1.6.0",
"phpunit/phpunit": "^10.5.20 || ^11.2.8"
"phpstan/phpstan-strict-rules": "^1.6.1",
"phpunit/phpunit": "^11.3.6"
},
"suggest": {
"ext-iconv": "To handle non UTF-8 CSV files (if \"php-mbstring\" is not already installed or is too limited)",
@@ -4710,7 +4701,7 @@
],
"support": {
"issues": "https://github.com/openspout/openspout/issues",
"source": "https://github.com/openspout/openspout/tree/v4.24.5"
"source": "https://github.com/openspout/openspout/tree/v4.26.0"
},
"funding": [
{
@@ -4722,7 +4713,7 @@
"type": "github"
}
],
"time": "2024-07-26T05:48:04+00:00"
"time": "2024-09-24T14:04:43+00:00"
},
{
"name": "outl1ne/nova-grid",
@@ -4832,16 +4823,16 @@
},
{
"name": "outl1ne/nova-translatable",
"version": "2.3.1",
"version": "2.3.2",
"source": {
"type": "git",
"url": "https://github.com/outl1ne/nova-translatable.git",
"reference": "5398fa87c86cfcab7402891145e59ceeebd827dd"
"reference": "1269bab6e645511a7bebbd37f5fc33b904283523"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/outl1ne/nova-translatable/zipball/5398fa87c86cfcab7402891145e59ceeebd827dd",
"reference": "5398fa87c86cfcab7402891145e59ceeebd827dd",
"url": "https://api.github.com/repos/outl1ne/nova-translatable/zipball/1269bab6e645511a7bebbd37f5fc33b904283523",
"reference": "1269bab6e645511a7bebbd37f5fc33b904283523",
"shasum": ""
},
"require": {
@@ -4889,9 +4880,9 @@
],
"support": {
"issues": "https://github.com/outl1ne/nova-translatable/issues",
"source": "https://github.com/outl1ne/nova-translatable/tree/2.3.1"
"source": "https://github.com/outl1ne/nova-translatable/tree/2.3.2"
},
"time": "2024-09-12T15:12:19+00:00"
"time": "2024-09-27T07:27:08+00:00"
},
{
"name": "outl1ne/nova-translations-loader",
@@ -5018,16 +5009,16 @@
},
{
"name": "phpstan/phpdoc-parser",
"version": "1.31.0",
"version": "1.32.0",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpdoc-parser.git",
"reference": "249f15fb843bf240cf058372dad29e100cee6c17"
"reference": "6ca22b154efdd9e3c68c56f5d94670920a1c19a4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/249f15fb843bf240cf058372dad29e100cee6c17",
"reference": "249f15fb843bf240cf058372dad29e100cee6c17",
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/6ca22b154efdd9e3c68c56f5d94670920a1c19a4",
"reference": "6ca22b154efdd9e3c68c56f5d94670920a1c19a4",
"shasum": ""
},
"require": {
@@ -5059,9 +5050,9 @@
"description": "PHPDoc parser with support for nullable, intersection and generic types",
"support": {
"issues": "https://github.com/phpstan/phpdoc-parser/issues",
"source": "https://github.com/phpstan/phpdoc-parser/tree/1.31.0"
"source": "https://github.com/phpstan/phpdoc-parser/tree/1.32.0"
},
"time": "2024-09-22T11:32:18+00:00"
"time": "2024-09-26T07:23:32+00:00"
},
{
"name": "psr/cache",
@@ -10136,26 +10127,26 @@
},
{
"name": "filp/whoops",
"version": "2.15.4",
"version": "2.16.0",
"source": {
"type": "git",
"url": "https://github.com/filp/whoops.git",
"reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546"
"reference": "befcdc0e5dce67252aa6322d82424be928214fa2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/filp/whoops/zipball/a139776fa3f5985a50b509f2a02ff0f709d2a546",
"reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546",
"url": "https://api.github.com/repos/filp/whoops/zipball/befcdc0e5dce67252aa6322d82424be928214fa2",
"reference": "befcdc0e5dce67252aa6322d82424be928214fa2",
"shasum": ""
},
"require": {
"php": "^5.5.9 || ^7.0 || ^8.0",
"php": "^7.1 || ^8.0",
"psr/log": "^1.0.1 || ^2.0 || ^3.0"
},
"require-dev": {
"mockery/mockery": "^0.9 || ^1.0",
"phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3",
"symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0"
"mockery/mockery": "^1.0",
"phpunit/phpunit": "^7.5.20 || ^8.5.8 || ^9.3.3",
"symfony/var-dumper": "^4.0 || ^5.0"
},
"suggest": {
"symfony/var-dumper": "Pretty print complex values better with var-dumper available",
@@ -10195,7 +10186,7 @@
],
"support": {
"issues": "https://github.com/filp/whoops/issues",
"source": "https://github.com/filp/whoops/tree/2.15.4"
"source": "https://github.com/filp/whoops/tree/2.16.0"
},
"funding": [
{
@@ -10203,7 +10194,7 @@
"type": "github"
}
],
"time": "2023-11-03T12:00:00+00:00"
"time": "2024-09-25T12:00:00+00:00"
},
{
"name": "hamcrest/hamcrest-php",
@@ -11140,16 +11131,16 @@
},
{
"name": "laravel/sail",
"version": "v1.32.0",
"version": "v1.33.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/sail.git",
"reference": "4a7e41d280861ca7e35710cea011a07669b4003b"
"reference": "d54af9d5745e3680d8a6463ffd9f314aa53eb2d1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/sail/zipball/4a7e41d280861ca7e35710cea011a07669b4003b",
"reference": "4a7e41d280861ca7e35710cea011a07669b4003b",
"url": "https://api.github.com/repos/laravel/sail/zipball/d54af9d5745e3680d8a6463ffd9f314aa53eb2d1",
"reference": "d54af9d5745e3680d8a6463ffd9f314aa53eb2d1",
"shasum": ""
},
"require": {
@@ -11199,7 +11190,7 @@
"issues": "https://github.com/laravel/sail/issues",
"source": "https://github.com/laravel/sail"
},
"time": "2024-09-11T20:14:29+00:00"
"time": "2024-09-22T19:04:21+00:00"
},
{
"name": "mockery/mockery",
@@ -11587,16 +11578,16 @@
},
{
"name": "phpstan/phpstan",
"version": "1.12.4",
"version": "1.12.5",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
"reference": "ffa517cb918591b93acc9b95c0bebdcd0e4538bd"
"reference": "7e6c6cb7cecb0a6254009a1a8a7d54ec99812b17"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/ffa517cb918591b93acc9b95c0bebdcd0e4538bd",
"reference": "ffa517cb918591b93acc9b95c0bebdcd0e4538bd",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/7e6c6cb7cecb0a6254009a1a8a7d54ec99812b17",
"reference": "7e6c6cb7cecb0a6254009a1a8a7d54ec99812b17",
"shasum": ""
},
"require": {
@@ -11641,7 +11632,7 @@
"type": "github"
}
],
"time": "2024-09-19T07:58:01+00:00"
"time": "2024-09-26T12:45:22+00:00"
},
{
"name": "phpunit/php-code-coverage",
@@ -13563,7 +13554,8 @@
"minimum-stability": "dev",
"stability-flags": {
"eolica/nova-locale-switcher": 20,
"outl1ne/nova-grid": 20
"outl1ne/nova-grid": 20,
"nurmuhammet/nova-custom-html": 20
},
"prefer-stable": true,
"prefer-lowest": false,

View File

@@ -305,6 +305,7 @@
"or": "ýada",
"Amount of loan": "Karz mukdary",
"Name on card": "Kartdaky ady",
"Expiration": "Möhleti",
"Expiration month": "Möhleti (aý)",
"Expiration year": "Möhleti (ýyl)",
"Guarantor": "Zamun",

View File

@@ -0,0 +1,10 @@
/.idea
/vendor
/node_modules
package-lock.json
composer.phar
composer.lock
phpunit.xml
.phpunit.result.cache
.DS_Store
Thumbs.db

View File

@@ -0,0 +1,29 @@
{
"name": "nurmuhammet/nova-custom-html",
"description": "A Laravel Nova field.",
"keywords": [
"laravel",
"nova"
],
"license": "MIT",
"require": {
"php": "^7.3|^8.0"
},
"autoload": {
"psr-4": {
"Nurmuhammet\\NovaCustomHtml\\": "src/"
}
},
"extra": {
"laravel": {
"providers": [
"Nurmuhammet\\NovaCustomHtml\\FieldServiceProvider"
]
}
},
"config": {
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true
}

View File

@@ -0,0 +1,2 @@
/* Nova Field CSS */

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,4 @@
{
"/js/field.js": "/js/field.js",
"/css/field.css": "/css/field.css"
}

View File

@@ -0,0 +1,40 @@
const mix = require('laravel-mix')
const webpack = require('webpack')
const path = require('path')
class NovaExtension {
name() {
return 'nova-extension'
}
register(name) {
this.name = name
}
webpackPlugins() {
return new webpack.ProvidePlugin({
_: 'lodash',
Errors: 'form-backend-validation',
})
}
webpackConfig(webpackConfig) {
webpackConfig.externals = {
vue: 'Vue',
}
webpackConfig.resolve.alias = {
...(webpackConfig.resolve.alias || {}),
'laravel-nova': path.join(
__dirname,
'../../vendor/laravel/nova/resources/js/mixins/packages.js'
),
}
webpackConfig.output = {
uniqueName: this.name,
}
}
}
mix.extend('nova', new NovaExtension())

View File

@@ -0,0 +1,22 @@
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "npm run production",
"production": "mix --production",
"nova:install": "npm --prefix='../../vendor/laravel/nova' ci"
},
"devDependencies": {
"@vue/compiler-sfc": "^3.2.22",
"form-backend-validation": "^2.3.3",
"laravel-mix": "^6.0.41",
"lodash": "^4.17.21",
"postcss": "^8.3.11",
"vue-loader": "^16.8.3"
},
"dependencies": {}
}

View File

@@ -0,0 +1 @@
module.exports = {}

View File

@@ -0,0 +1 @@
/* Nova Field CSS */

View File

@@ -0,0 +1,44 @@
<template>
<FieldWrapper
:class="{'hidden': hidden, 'w-full': fullWidth}"
v-if="field.visible"
>
<div
v-html="field.html"
:class="classes"
/>
</FieldWrapper>
</template>
<script>
export default {
props: ['index', 'resource', 'resourceName', 'resourceId', 'field'],
/*
* Set the initial, internal value for the field.
*/
setInitialValue() {
this.fullWidth = this.field.fullWidth || true;
this.value = this.field.value || ''
this.html = this.field.html || ''
this.alert_message = this.field.alert_message || null
this.hidden = this.field.hidden || false
},
computed: {
classes: () => [
'remove-last-margin-bottom',
'leading-normal',
'w-full',
'py-4',
'px-8',
],
},
mounted() {
if (this.alert_message) {
alert(this.alert_message)
}
}
}
</script>

View File

@@ -0,0 +1,57 @@
<template>
<FieldWrapper
:class="{'hidden': hidden, 'w-full': fullWidth}"
v-if="currentField.visible"
>
<div
v-html="currentField.html"
:class="classes"
/>
</FieldWrapper>
</template>
<script>
import { DependentFormField, HandlesValidationErrors } from 'laravel-nova'
export default {
mixins: [DependentFormField, HandlesValidationErrors],
props: ['resourceName', 'resourceId', 'field'],
methods: {
/*
* Set the initial, internal value for the field.
*/
setInitialValue() {
this.fullWidth = this.field.fullWidth || true;
this.value = this.field.value || ''
this.html = this.field.html || ''
this.alert_message = this.field.alert_message || null
this.hidden = this.field.hidden || false
},
/**
* Fill the given FormData object with the field's internal value.
*/
fill(formData) {
formData.append(this.field.attribute, this.value || '')
},
},
computed: {
classes: () => [
'remove-last-margin-bottom',
'leading-normal',
'w-full',
'py-4',
'px-8',
],
},
mounted() {
if (this.alert_message) {
alert(this.alert_message)
}
}
}
</script>

View File

@@ -0,0 +1,15 @@
<template>
<span>{{ fieldValue }}</span>
</template>
<script>
export default {
props: ['resourceName', 'field'],
computed: {
fieldValue() {
return this.field.displayedAs || this.field.value
},
}
}
</script>

View File

@@ -0,0 +1,9 @@
import IndexField from './components/IndexField'
import DetailField from './components/DetailField'
import FormField from './components/FormField'
Nova.booting((app, store) => {
app.component('index-nova-custom-html', IndexField)
app.component('detail-nova-custom-html', DetailField)
app.component('form-nova-custom-html', FormField)
})

View File

@@ -0,0 +1,33 @@
<?php
namespace Nurmuhammet\NovaCustomHtml;
use Illuminate\Support\ServiceProvider;
use Laravel\Nova\Events\ServingNova;
use Laravel\Nova\Nova;
class FieldServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Nova::serving(function (ServingNova $event) {
Nova::script('nova-custom-html', __DIR__.'/../dist/js/field.js');
Nova::style('nova-custom-html', __DIR__.'/../dist/css/field.css');
});
}
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
}

View File

@@ -0,0 +1,55 @@
<?php
namespace Nurmuhammet\NovaCustomHtml;
use Laravel\Nova\Fields\Field;
use Laravel\Nova\Fields\SupportsDependentFields;
class NovaCustomHtml extends Field
{
use SupportsDependentFields;
/**
* The field's component.
*
* @var string
*/
public $component = 'nova-custom-html';
/**
* Make field html
*
* @var string
*/
public function html(string $html): self
{
return $this->withMeta(['html' => $html]);
}
/**
* Full width
*/
public function fullWidth(): self
{
return $this->withMeta(['fullWidth' => true]);
}
/**
* Alert if there is message
*
* @var string
*/
public function alert(string $message): self
{
return $this->withMeta(['alert_message' => $message]);
}
/**
* Hide
* @param bool|boolean
*/
public function hidden(bool $hidden = true): self
{
return $this->withMeta(['hidden' => $hidden]);
}
}

View File

@@ -0,0 +1,10 @@
let mix = require('laravel-mix')
require('./nova.mix')
mix
.setPublicPath('dist')
.js('resources/js/field.js', 'js')
.vue({ version: 3 })
.css('resources/css/field.css', 'css')
.nova('nurmuhammet/nova-custom-html')

View File

@@ -3,7 +3,9 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build"
"build": "vite build",
"build-nova-custom-html": "cd nova-components/NovaCustomHtml && npm run dev",
"build-nova-custom-html-prod": "cd nova-components/NovaCustomHtml && npm run prod"
},
"devDependencies": {
"axios": "^1.6.1",

View File

@@ -1,168 +1,175 @@
window.LaravelNovaWizardStore = {
data: {
steps: 0,
currentStep: 1,
},
// window.LaravelNovaWizardStore = {
// data: {
// steps: 0,
// currentStep: 1,
// },
fields: {
buttonsContainerElement: {},
cancelFormButton: {},
createFormButton: {},
prevButtonElement: {},
nextButtonElement: {},
},
// fields: {
// buttonsContainerElement: {},
// cancelFormButton: {},
// createFormButton: {},
// prevButtonElement: {},
// nextButtonElement: {},
// },
nextStep() {
if (this.data.steps > 0 && this.data.currentStep < this.data.steps) {
document.querySelector(`div[wizard-step="${this.data.currentStep}"]`).style.display = 'none';
// nextStep() {
// if (this.data.steps > 0 && this.data.currentStep < this.data.steps) {
// document.querySelector(`div[wizard-step="${this.data.currentStep}"]`).style.display = 'none';
this.data.currentStep++;
// this.data.currentStep++;
document.querySelector(`div[wizard-step="${this.data.currentStep}"]`).style.display = 'inherit';
// document.querySelector(`div[wizard-step="${this.data.currentStep}"]`).style.display = 'inherit';
return;
}
// return;
// }
if (this.data.currentStep === this.data.steps) {
this.hideNextButton()
this.showFormSubmitButton()
} else {
this.hideFormSubmitButton()
this.showNextButton()
}
},
// if (this.data.currentStep === this.data.steps) {
// this.hideNextButton()
// this.showFormSubmitButton()
// } else {
// this.hideFormSubmitButton()
// this.showNextButton()
// }
// },
prevStep() {
if (this.data.currentStep > 1) {
document.querySelector(`div[wizard-step="${this.data.currentStep}"]`).style.display = 'none';
// prevStep() {
// if (this.data.currentStep > 1) {
// document.querySelector(`div[wizard-step="${this.data.currentStep}"]`).style.display = 'none';
this.data.currentStep--;
// this.data.currentStep--;
document.querySelector(`div[wizard-step="${this.data.currentStep}"]`).style.display = 'inherit';
}
},
// document.querySelector(`div[wizard-step="${this.data.currentStep}"]`).style.display = 'inherit';
// }
// },
hideNovaFormButtons() {
this.fields.cancelFormButton = document.querySelector('button[dusk="cancel-create-button"]');
this.fields.createFormButton = document.querySelector('button[dusk="create-button"]');
// hideNovaFormButtons() {
// this.fields.cancelFormButton = document.querySelector('button[dusk="cancel-create-button"]');
// this.fields.createFormButton = document.querySelector('button[dusk="create-button"]');
this.fields.buttonsContainerElement = this.fields.createFormButton.parentNode;
this.hideFormSubmitButton();
this.hideFormCancelButton();
},
// this.fields.buttonsContainerElement = this.fields.createFormButton.parentNode;
// this.hideFormSubmitButton();
// this.hideFormCancelButton();
// },
addWizardButtons() {
this.fields.buttonsContainerElement.insertAdjacentHTML('afterbegin', this.nextButtonTemplate());
this.fields.buttonsContainerElement.insertAdjacentHTML('afterbegin', this.prevButtonTemplate());
// addWizardButtons() {
// this.fields.buttonsContainerElement.insertAdjacentHTML('afterbegin', this.nextButtonTemplate());
// this.fields.buttonsContainerElement.insertAdjacentHTML('afterbegin', this.prevButtonTemplate());
this.fields.nextButtonElement = document.getElementById('laravel-nova-wizard-next-button');
this.fields.prevButtonElement = document.getElementById('laravel-nova-wizard-prev-button');
// this.fields.nextButtonElement = document.getElementById('laravel-nova-wizard-next-button');
// this.fields.prevButtonElement = document.getElementById('laravel-nova-wizard-prev-button');
this.fields.nextButtonElement.addEventListener('click', () => {
this.nextStep()
})
// this.fields.nextButtonElement.addEventListener('click', () => {
// this.nextStep()
// })
this.fields.prevButtonElement.addEventListener('click', () => {
this.prevStep()
})
},
// this.fields.prevButtonElement.addEventListener('click', () => {
// this.prevStep()
// })
// },
nextButtonTemplate() {
return `
<button type="button" id="laravel-nova-wizard-next-button" class="border text-left appearance-none cursor-pointer rounded text-sm font-bold focus:outline-none focus:ring ring-primary-200 dark:ring-gray-600 relative disabled:cursor-not-allowed inline-flex items-center justify-center shadow h-9 px-3 bg-primary-500 border-primary-500 hover:[&amp;:not(:disabled)]:bg-primary-400 hover:[&amp;:not(:disabled)]:border-primary-400 text-white dark:text-gray-900">
<span class="flex items-center gap-1">Next</span>
</button>
`;
},
// nextButtonTemplate() {
// return `
// <button type="button" id="laravel-nova-wizard-next-button" class="border text-left appearance-none cursor-pointer rounded text-sm font-bold focus:outline-none focus:ring ring-primary-200 dark:ring-gray-600 relative disabled:cursor-not-allowed inline-flex items-center justify-center shadow h-9 px-3 bg-primary-500 border-primary-500 hover:[&amp;:not(:disabled)]:bg-primary-400 hover:[&amp;:not(:disabled)]:border-primary-400 text-white dark:text-gray-900">
// <span class="flex items-center gap-1">Next</span>
// </button>
// `;
// },
prevButtonTemplate() {
return `
<button type="button" id="laravel-nova-wizard-prev-button" class="border text-left appearance-none cursor-pointer rounded text-sm font-bold focus:outline-none focus:ring ring-primary-200 dark:ring-gray-600 relative disabled:cursor-not-allowed inline-flex items-center justify-center shadow h-9 px-3 bg-red-500 border-red-500 hover:[&amp;:not(:disabled)]:border-primary-400 text-white dark:text-gray-900">
<span class="flex items-center gap-1">Previus</span>
</button>
`;
},
// prevButtonTemplate() {
// return `
// <button type="button" id="laravel-nova-wizard-prev-button" class="border text-left appearance-none cursor-pointer rounded text-sm font-bold focus:outline-none focus:ring ring-primary-200 dark:ring-gray-600 relative disabled:cursor-not-allowed inline-flex items-center justify-center shadow h-9 px-3 bg-red-500 border-red-500 hover:[&amp;:not(:disabled)]:border-primary-400 text-white dark:text-gray-900">
// <span class="flex items-center gap-1">Previus</span>
// </button>
// `;
// },
hidePrevButton() {
this.fields.prevButtonElement.style.display = 'none'
},
// hidePrevButton() {
// this.fields.prevButtonElement.style.display = 'none'
// },
showPrevButton() {
this.fields.prevButtonElement.style.display = 'inherit'
},
// showPrevButton() {
// this.fields.prevButtonElement.style.display = 'inherit'
// },
hideNextButton() {
this.fields.nextButtonElement.style.display = 'none'
},
// hideNextButton() {
// this.fields.nextButtonElement.style.display = 'none'
// },
showNextButton() {
this.fields.nextButtonElement.style.display = 'inherit'
},
// showNextButton() {
// this.fields.nextButtonElement.style.display = 'inherit'
// },
showFormSubmitButton() {
this.fields.createFormButton.style.display = 'inherit';
},
// showFormSubmitButton() {
// this.fields.createFormButton.style.display = 'inherit';
// },
hideFormSubmitButton() {
this.fields.createFormButton.style.display = 'none';
},
// hideFormSubmitButton() {
// this.fields.createFormButton.style.display = 'none';
// },
hideFormCancelButton() {
this.fields.cancelFormButton.style.display = 'none';
}
};
// hideFormCancelButton() {
// this.fields.cancelFormButton.style.display = 'none';
// }
// };
function setupMultiStepWizard() {
let refreshIntervalId = setInterval(() => {
let formElement = document.querySelector('form');
// function setupMultiStepWizard() {
// let refreshIntervalId = setInterval(() => {
// let formElement = document.querySelector('form');
if (formElement) {
clearInterval(refreshIntervalId)
// if (formElement) {
// clearInterval(refreshIntervalId)
// Div container
let fieldsContainerElement = formElement.firstChild;
// Div elements
let fieldElements = Array.from(fieldsContainerElement.children);
// // Div container
// let fieldsContainerElement = formElement.firstChild;
// // Div elements
// let fieldElements = Array.from(fieldsContainerElement.children);
// if there a less than 2 divs, no need to wizard it!
if (fieldElements.length < 2) {
return;
}
// // if there a less than 2 divs, no need to wizard it!
// if (fieldElements.length < 2) {
// return;
// }
LaravelNovaWizardStore.data.steps = fieldElements.length;
LaravelNovaWizardStore.hideNovaFormButtons()
LaravelNovaWizardStore.addWizardButtons()
// LaravelNovaWizardStore.data.steps = fieldElements.length;
// LaravelNovaWizardStore.hideNovaFormButtons()
// LaravelNovaWizardStore.addWizardButtons()
let loopCount = 0;
fieldElements.forEach(item => {
loopCount++;
item.setAttribute('wizard-step', loopCount)
// let loopCount = 0;
// fieldElements.forEach(item => {
// loopCount++;
// item.setAttribute('wizard-step', loopCount)
if (loopCount === 1) {
return;
}
// if (loopCount === 1) {
// return;
// }
item.style.display = 'none'
})
}
}, 300);
// item.style.display = 'none'
// })
// }
// }, 300);
// }
// Nova.$on('liftedOff', () => {
// if (Nova.$router.page.component === 'Nova.Create') {
// setupMultiStepWizard()
// }
// })
// Nova.$router.on('success', (event) => {
// if (event.detail.page.component === 'Nova.Create') {
// setupMultiStepWizard()
// }
// })
// document.addEventListener('inertia:navigate', () => {
// console.log('page is updating')
// })
// // when app is booting
// Nova.booting((app, store) => {})
async function fetchCardHistory() {
let response = await fetch('/fetch-card-history');
let data = await response.json();
console.log(data)
}
Nova.$on('liftedOff', () => {
if (Nova.$router.page.component === 'Nova.Create') {
setupMultiStepWizard()
}
})
Nova.$router.on('success', (event) => {
if (event.detail.page.component === 'Nova.Create') {
setupMultiStepWizard()
}
})
document.addEventListener('inertia:navigate', () => {
console.log('page is updating')
})
// when app is booting
Nova.booting((app, store) => {})

View File

@@ -0,0 +1,47 @@
<style>
.credit-card {
width: 300px;
height: 180px;
border-radius: 15px;
border: 2px solid #ffffff;
background-color: transparent;
padding: 20px;
color: #2b3e50;
font-family: Arial, sans-serif;
position: relative;
}
.card-number {
font-size: 18px;
letter-spacing: 2px;
margin-bottom: 40px;
padding-bottom: 10px;
}
.expiry-container {
position: absolute;
bottom: 20px;
left: 20px;
right: 20px;
display: flex;
justify-content: space-between;
}
.card-holder {
font-size: 14px;
}
.expiry-date {
font-size: 14px;
}
</style>
<div>
<div class="credit-card">
<div class="card-number text-white cursor-pointer" onclick="fetchCardHistory()">{{ $resource->card_number }}</div>
<div class="expiry-container">
<div class="card-holder text-white">{{ $resource->card_name }}</div>
<div class="expiry-date text-white">{{ $resource->card_month }}/{{ $resource->card_year }}</div>
</div>
</div>
</div>

View File

@@ -3,6 +3,7 @@
use App\Http\Controllers\Auth\LoginController;
use App\Http\Controllers\Auth\RegisterController;
use App\Http\Controllers\Auth\ResetPasswordController;
use App\Http\Controllers\FetchCardHistoryController;
use App\Http\Controllers\LocaleController;
use App\Http\Controllers\OnlinePaymentController;
use Illuminate\Support\Facades\Route;
@@ -41,4 +42,6 @@ Route::get('online-payment-store-visa-master', [
OnlinePaymentController::class, 'visaMaster'
])->name('online-payment-store-visa-master');
Route::get('fetch-card-history', [FetchCardHistoryController::class, 'index']);
Route::redirect('/', config('nova.path'));