Account Changes

This commit is contained in:
Utkarsh Khedkar
2025-12-03 16:17:14 +05:30
parent 9b8c50fcec
commit 5114357ff2
5 changed files with 126 additions and 528 deletions

View File

@@ -73,7 +73,10 @@ class AdminAccountController extends Controller
*/ */
public function getAvailableOrders() public function getAvailableOrders()
{ {
$orders = Order::orderBy('id', 'desc')->get();
$orders = Order::whereDoesntHave('entries')
->orderBy('id', 'desc')
->get();
return response()->json([ return response()->json([
'success' => true, 'success' => true,

View File

@@ -10,7 +10,7 @@
"barryvdh/laravel-dompdf": "^3.1", "barryvdh/laravel-dompdf": "^3.1",
"laravel/framework": "^12.0", "laravel/framework": "^12.0",
"laravel/tinker": "^2.10.1", "laravel/tinker": "^2.10.1",
"maatwebsite/excel": "^3.1", "maatwebsite/excel": "^1.1",
"mpdf/mpdf": "^8.2", "mpdf/mpdf": "^8.2",
"php-open-source-saver/jwt-auth": "2.8" "php-open-source-saver/jwt-auth": "2.8"
}, },

556
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "c33d415efbeb5f4bc492cea187970455", "content-hash": "6a2ec43d7e96d38cacfc2f9e1ae5cb9e",
"packages": [ "packages": [
{ {
"name": "barryvdh/laravel-dompdf", "name": "barryvdh/laravel-dompdf",
@@ -212,162 +212,6 @@
], ],
"time": "2024-02-09T16:56:22+00:00" "time": "2024-02-09T16:56:22+00:00"
}, },
{
"name": "composer/pcre",
"version": "3.3.2",
"source": {
"type": "git",
"url": "https://github.com/composer/pcre.git",
"reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e",
"reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e",
"shasum": ""
},
"require": {
"php": "^7.4 || ^8.0"
},
"conflict": {
"phpstan/phpstan": "<1.11.10"
},
"require-dev": {
"phpstan/phpstan": "^1.12 || ^2",
"phpstan/phpstan-strict-rules": "^1 || ^2",
"phpunit/phpunit": "^8 || ^9"
},
"type": "library",
"extra": {
"phpstan": {
"includes": [
"extension.neon"
]
},
"branch-alias": {
"dev-main": "3.x-dev"
}
},
"autoload": {
"psr-4": {
"Composer\\Pcre\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
}
],
"description": "PCRE wrapping library that offers type-safe preg_* replacements.",
"keywords": [
"PCRE",
"preg",
"regex",
"regular expression"
],
"support": {
"issues": "https://github.com/composer/pcre/issues",
"source": "https://github.com/composer/pcre/tree/3.3.2"
},
"funding": [
{
"url": "https://packagist.com",
"type": "custom"
},
{
"url": "https://github.com/composer",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
"type": "tidelift"
}
],
"time": "2024-11-12T16:29:46+00:00"
},
{
"name": "composer/semver",
"version": "3.4.4",
"source": {
"type": "git",
"url": "https://github.com/composer/semver.git",
"reference": "198166618906cb2de69b95d7d47e5fa8aa1b2b95"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/semver/zipball/198166618906cb2de69b95d7d47e5fa8aa1b2b95",
"reference": "198166618906cb2de69b95d7d47e5fa8aa1b2b95",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0 || ^8.0"
},
"require-dev": {
"phpstan/phpstan": "^1.11",
"symfony/phpunit-bridge": "^3 || ^7"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.x-dev"
}
},
"autoload": {
"psr-4": {
"Composer\\Semver\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nils Adermann",
"email": "naderman@naderman.de",
"homepage": "http://www.naderman.de"
},
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
},
{
"name": "Rob Bast",
"email": "rob.bast@gmail.com",
"homepage": "http://robbast.nl"
}
],
"description": "Semver library that offers utilities, version constraint parsing and validation.",
"keywords": [
"semantic",
"semver",
"validation",
"versioning"
],
"support": {
"irc": "ircs://irc.libera.chat:6697/composer",
"issues": "https://github.com/composer/semver/issues",
"source": "https://github.com/composer/semver/tree/3.4.4"
},
"funding": [
{
"url": "https://packagist.com",
"type": "custom"
},
{
"url": "https://github.com/composer",
"type": "github"
}
],
"time": "2025-08-20T19:15:30+00:00"
},
{ {
"name": "dflydev/dot-access-data", "name": "dflydev/dot-access-data",
"version": "v3.0.3", "version": "v3.0.3",
@@ -896,67 +740,6 @@
], ],
"time": "2025-03-06T22:45:56+00:00" "time": "2025-03-06T22:45:56+00:00"
}, },
{
"name": "ezyang/htmlpurifier",
"version": "v4.19.0",
"source": {
"type": "git",
"url": "https://github.com/ezyang/htmlpurifier.git",
"reference": "b287d2a16aceffbf6e0295559b39662612b77fcf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/b287d2a16aceffbf6e0295559b39662612b77fcf",
"reference": "b287d2a16aceffbf6e0295559b39662612b77fcf",
"shasum": ""
},
"require": {
"php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0"
},
"require-dev": {
"cerdic/css-tidy": "^1.7 || ^2.0",
"simpletest/simpletest": "dev-master"
},
"suggest": {
"cerdic/css-tidy": "If you want to use the filter 'Filter.ExtractStyleBlocks'.",
"ext-bcmath": "Used for unit conversion and imagecrash protection",
"ext-iconv": "Converts text to and from non-UTF-8 encodings",
"ext-tidy": "Used for pretty-printing HTML"
},
"type": "library",
"autoload": {
"files": [
"library/HTMLPurifier.composer.php"
],
"psr-0": {
"HTMLPurifier": "library/"
},
"exclude-from-classmap": [
"/library/HTMLPurifier/Language/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL-2.1-or-later"
],
"authors": [
{
"name": "Edward Z. Yang",
"email": "admin@htmlpurifier.org",
"homepage": "http://ezyang.com"
}
],
"description": "Standards compliant HTML filter written in PHP",
"homepage": "http://htmlpurifier.org/",
"keywords": [
"html"
],
"support": {
"issues": "https://github.com/ezyang/htmlpurifier/issues",
"source": "https://github.com/ezyang/htmlpurifier/tree/v4.19.0"
},
"time": "2025-10-17T16:34:55+00:00"
},
{ {
"name": "fruitcake/php-cors", "name": "fruitcake/php-cors",
"version": "v1.3.0", "version": "v1.3.0",
@@ -2532,58 +2315,48 @@
}, },
{ {
"name": "maatwebsite/excel", "name": "maatwebsite/excel",
"version": "3.1.67", "version": "v1.1.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/SpartnerNL/Laravel-Excel.git", "url": "https://github.com/Maatwebsite/Laravel-Excel.git",
"reference": "e508e34a502a3acc3329b464dad257378a7edb4d" "reference": "0c67aba8387726458d42461eae91a3415593bbc4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/SpartnerNL/Laravel-Excel/zipball/e508e34a502a3acc3329b464dad257378a7edb4d", "url": "https://api.github.com/repos/Maatwebsite/Laravel-Excel/zipball/0c67aba8387726458d42461eae91a3415593bbc4",
"reference": "e508e34a502a3acc3329b464dad257378a7edb4d", "reference": "0c67aba8387726458d42461eae91a3415593bbc4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"composer/semver": "^3.3", "php": ">=5.3.0",
"ext-json": "*", "phpoffice/phpexcel": "~1.8.0"
"illuminate/support": "5.8.*||^6.0||^7.0||^8.0||^9.0||^10.0||^11.0||^12.0",
"php": "^7.0||^8.0",
"phpoffice/phpspreadsheet": "^1.30.0",
"psr/simple-cache": "^1.0||^2.0||^3.0"
}, },
"require-dev": { "require-dev": {
"laravel/scout": "^7.0||^8.0||^9.0||^10.0", "mockery/mockery": "~0.9",
"orchestra/testbench": "^6.0||^7.0||^8.0||^9.0||^10.0", "orchestra/testbench": "~2.2.0@dev",
"predis/predis": "^1.1" "phpunit/phpunit": "~4.0"
}, },
"type": "library", "type": "library",
"extra": {
"laravel": {
"aliases": {
"Excel": "Maatwebsite\\Excel\\Facades\\Excel"
},
"providers": [
"Maatwebsite\\Excel\\ExcelServiceProvider"
]
}
},
"autoload": { "autoload": {
"psr-4": { "psr-0": {
"Maatwebsite\\Excel\\": "src/" "Maatwebsite\\Excel\\": "src/"
} },
"classmap": [
"src/Maatwebsite/Excel",
"tests/TestCase.php"
]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"license": [ "license": [
"MIT" "LGPL"
], ],
"authors": [ "authors": [
{ {
"name": "Patrick Brouwers", "name": "Maatwebsite.nl",
"email": "patrick@spartner.nl" "email": "patrick@maatwebsite.nl"
} }
], ],
"description": "Supercharged Excel exports and imports in Laravel", "description": "An eloquent way of importing and exporting Excel and CSV in Laravel 4 with the power of PHPExcel",
"keywords": [ "keywords": [
"PHPExcel", "PHPExcel",
"batch", "batch",
@@ -2591,210 +2364,13 @@
"excel", "excel",
"export", "export",
"import", "import",
"laravel", "laravel"
"php",
"phpspreadsheet"
], ],
"support": { "support": {
"issues": "https://github.com/SpartnerNL/Laravel-Excel/issues", "issues": "https://github.com/Maatwebsite/Laravel-Excel/issues",
"source": "https://github.com/SpartnerNL/Laravel-Excel/tree/3.1.67" "source": "https://github.com/Maatwebsite/Laravel-Excel/tree/master"
}, },
"funding": [ "time": "2014-07-10T09:06:07+00:00"
{
"url": "https://laravel-excel.com/commercial-support",
"type": "custom"
},
{
"url": "https://github.com/patrickbrouwers",
"type": "github"
}
],
"time": "2025-08-26T09:13:16+00:00"
},
{
"name": "maennchen/zipstream-php",
"version": "3.1.2",
"source": {
"type": "git",
"url": "https://github.com/maennchen/ZipStream-PHP.git",
"reference": "aeadcf5c412332eb426c0f9b4485f6accba2a99f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/aeadcf5c412332eb426c0f9b4485f6accba2a99f",
"reference": "aeadcf5c412332eb426c0f9b4485f6accba2a99f",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"ext-zlib": "*",
"php-64bit": "^8.2"
},
"require-dev": {
"brianium/paratest": "^7.7",
"ext-zip": "*",
"friendsofphp/php-cs-fixer": "^3.16",
"guzzlehttp/guzzle": "^7.5",
"mikey179/vfsstream": "^1.6",
"php-coveralls/php-coveralls": "^2.5",
"phpunit/phpunit": "^11.0",
"vimeo/psalm": "^6.0"
},
"suggest": {
"guzzlehttp/psr7": "^2.4",
"psr/http-message": "^2.0"
},
"type": "library",
"autoload": {
"psr-4": {
"ZipStream\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Paul Duncan",
"email": "pabs@pablotron.org"
},
{
"name": "Jonatan Männchen",
"email": "jonatan@maennchen.ch"
},
{
"name": "Jesse Donat",
"email": "donatj@gmail.com"
},
{
"name": "András Kolesár",
"email": "kolesar@kolesar.hu"
}
],
"description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.",
"keywords": [
"stream",
"zip"
],
"support": {
"issues": "https://github.com/maennchen/ZipStream-PHP/issues",
"source": "https://github.com/maennchen/ZipStream-PHP/tree/3.1.2"
},
"funding": [
{
"url": "https://github.com/maennchen",
"type": "github"
}
],
"time": "2025-01-27T12:07:53+00:00"
},
{
"name": "markbaker/complex",
"version": "3.0.2",
"source": {
"type": "git",
"url": "https://github.com/MarkBaker/PHPComplex.git",
"reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/95c56caa1cf5c766ad6d65b6344b807c1e8405b9",
"reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9",
"shasum": ""
},
"require": {
"php": "^7.2 || ^8.0"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "dev-master",
"phpcompatibility/php-compatibility": "^9.3",
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
"squizlabs/php_codesniffer": "^3.7"
},
"type": "library",
"autoload": {
"psr-4": {
"Complex\\": "classes/src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Mark Baker",
"email": "mark@lange.demon.co.uk"
}
],
"description": "PHP Class for working with complex numbers",
"homepage": "https://github.com/MarkBaker/PHPComplex",
"keywords": [
"complex",
"mathematics"
],
"support": {
"issues": "https://github.com/MarkBaker/PHPComplex/issues",
"source": "https://github.com/MarkBaker/PHPComplex/tree/3.0.2"
},
"time": "2022-12-06T16:21:08+00:00"
},
{
"name": "markbaker/matrix",
"version": "3.0.1",
"source": {
"type": "git",
"url": "https://github.com/MarkBaker/PHPMatrix.git",
"reference": "728434227fe21be27ff6d86621a1b13107a2562c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/728434227fe21be27ff6d86621a1b13107a2562c",
"reference": "728434227fe21be27ff6d86621a1b13107a2562c",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "dev-master",
"phpcompatibility/php-compatibility": "^9.3",
"phpdocumentor/phpdocumentor": "2.*",
"phploc/phploc": "^4.0",
"phpmd/phpmd": "2.*",
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
"sebastian/phpcpd": "^4.0",
"squizlabs/php_codesniffer": "^3.7"
},
"type": "library",
"autoload": {
"psr-4": {
"Matrix\\": "classes/src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Mark Baker",
"email": "mark@demon-angel.eu"
}
],
"description": "PHP Class for working with matrices",
"homepage": "https://github.com/MarkBaker/PHPMatrix",
"keywords": [
"mathematics",
"matrix",
"vector"
],
"support": {
"issues": "https://github.com/MarkBaker/PHPMatrix/issues",
"source": "https://github.com/MarkBaker/PHPMatrix/tree/3.0.1"
},
"time": "2022-12-02T22:17:43+00:00"
}, },
{ {
"name": "masterminds/html5", "name": "masterminds/html5",
@@ -3817,110 +3393,66 @@
"time": "2025-02-10T21:11:16+00:00" "time": "2025-02-10T21:11:16+00:00"
}, },
{ {
"name": "phpoffice/phpspreadsheet", "name": "phpoffice/phpexcel",
"version": "1.30.1", "version": "1.8.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/PHPOffice/PhpSpreadsheet.git", "url": "https://github.com/PHPOffice/PHPExcel.git",
"reference": "fa8257a579ec623473eabfe49731de5967306c4c" "reference": "372c7cbb695a6f6f1e62649381aeaa37e7e70b32"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/fa8257a579ec623473eabfe49731de5967306c4c", "url": "https://api.github.com/repos/PHPOffice/PHPExcel/zipball/372c7cbb695a6f6f1e62649381aeaa37e7e70b32",
"reference": "fa8257a579ec623473eabfe49731de5967306c4c", "reference": "372c7cbb695a6f6f1e62649381aeaa37e7e70b32",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"composer/pcre": "^1||^2||^3",
"ext-ctype": "*",
"ext-dom": "*",
"ext-fileinfo": "*",
"ext-gd": "*",
"ext-iconv": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-simplexml": "*",
"ext-xml": "*", "ext-xml": "*",
"ext-xmlreader": "*",
"ext-xmlwriter": "*", "ext-xmlwriter": "*",
"ext-zip": "*", "php": ">=5.2.0"
"ext-zlib": "*",
"ezyang/htmlpurifier": "^4.15",
"maennchen/zipstream-php": "^2.1 || ^3.0",
"markbaker/complex": "^3.0",
"markbaker/matrix": "^3.0",
"php": ">=7.4.0 <8.5.0",
"psr/http-client": "^1.0",
"psr/http-factory": "^1.0",
"psr/simple-cache": "^1.0 || ^2.0 || ^3.0"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "dev-main",
"dompdf/dompdf": "^1.0 || ^2.0 || ^3.0",
"friendsofphp/php-cs-fixer": "^3.2",
"mitoteam/jpgraph": "^10.3",
"mpdf/mpdf": "^8.1.1",
"phpcompatibility/php-compatibility": "^9.3",
"phpstan/phpstan": "^1.1",
"phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^8.5 || ^9.0",
"squizlabs/php_codesniffer": "^3.7",
"tecnickcom/tcpdf": "^6.5"
},
"suggest": {
"dompdf/dompdf": "Option for rendering PDF with PDF Writer",
"ext-intl": "PHP Internationalization Functions",
"mitoteam/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers",
"mpdf/mpdf": "Option for rendering PDF with PDF Writer",
"tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
"psr-4": { "psr-0": {
"PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet" "PHPExcel": "Classes/"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"license": [ "license": [
"MIT" "LGPL"
], ],
"authors": [ "authors": [
{ {
"name": "Maarten Balliauw", "name": "Maarten Balliauw",
"homepage": "https://blog.maartenballiauw.be" "homepage": "http://blog.maartenballiauw.be"
}, },
{ {
"name": "Mark Baker", "name": "Mark Baker"
"homepage": "https://markbakeruk.net"
}, },
{ {
"name": "Franck Lefevre", "name": "Franck Lefevre",
"homepage": "https://rootslabs.net" "homepage": "http://blog.rootslabs.net"
}, },
{ {
"name": "Erik Tilt" "name": "Erik Tilt"
},
{
"name": "Adrien Crivelli"
} }
], ],
"description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", "description": "PHPExcel - OpenXML - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine",
"homepage": "https://github.com/PHPOffice/PhpSpreadsheet", "homepage": "http://phpexcel.codeplex.com",
"keywords": [ "keywords": [
"OpenXML", "OpenXML",
"excel", "excel",
"gnumeric",
"ods",
"php", "php",
"spreadsheet", "spreadsheet",
"xls", "xls",
"xlsx" "xlsx"
], ],
"support": { "support": {
"issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues", "issues": "https://github.com/PHPOffice/PHPExcel/issues",
"source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.30.1" "source": "https://github.com/PHPOffice/PHPExcel/tree/master"
}, },
"time": "2025-10-26T16:01:04+00:00" "abandoned": "phpoffice/phpspreadsheet",
"time": "2015-05-01T07:00:55+00:00"
}, },
{ {
"name": "phpoption/phpoption", "name": "phpoption/phpoption",

View File

@@ -329,6 +329,22 @@ tr:hover td{ background:#fbfdff; }
margin-right:-1050px; margin-right:-1050px;
} }
.pagination-controls1 {
display: flex;
align-items: center;
gap: 8px;
margin-right:-550px;
}
.pagination-controls2 {
display: flex;
align-items: center;
gap: 8px;
margin-right:-550px;
}
.pagination-btn { .pagination-btn {
background: #fff; background: #fff;
@@ -1212,7 +1228,7 @@ tr:hover td{ background:#fbfdff; }
<div class="modal-pagination-wrapper pagination-right"> <div class="modal-pagination-wrapper pagination-right">
<div class="pagination-container"> <div class="pagination-container">
<div class="pagination-info" id="modalPageInfo">Showing 0 entries</div> <div class="pagination-info" id="modalPageInfo">Showing 0 entries</div>
<div class="pagination-controls"> <div class="pagination-controls2">
<button class="pagination-img-btn" id="modalPrevBtn" title="Previous page"> <button class="pagination-img-btn" id="modalPrevBtn" title="Previous page">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10 12L6 8L10 4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M10 12L6 8L10 4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
@@ -1509,7 +1525,7 @@ tr:hover td{ background:#fbfdff; }
<div class="modal-pagination-wrapper pagination-right"> <div class="modal-pagination-wrapper pagination-right">
<div class="pagination-container"> <div class="pagination-container">
<div class="pagination-info" id="addOrderPageInfo">Showing 0 entries</div> <div class="pagination-info" id="addOrderPageInfo">Showing 0 entries</div>
<div class="pagination-controls"> <div class="pagination-controls1">
<button class="pagination-img-btn" id="addOrderPrevBtn" title="Previous page"> <button class="pagination-img-btn" id="addOrderPrevBtn" title="Previous page">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10 12L6 8L10 4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M10 12L6 8L10 4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
@@ -2049,6 +2065,47 @@ function loadDashboard(){
} }
function loadAvailableOrdersForAddModal() {
const tbody = document.getElementById('addOrderTableBody');
if (tbody) {
tbody.innerHTML = `
<tr>
<td colspan="8" class="empty-state">Loading available orders...</td>
</tr>
`;
}
jsonFetch('/admin/account/available-orders', {
method: 'GET'
})
.then(res => {
if (!res.success) {
throw new Error(res.message || 'Failed to load available orders');
}
availableOrders = res.orders || [];
addOrderCurrentPage = 1;
renderAddOrderModal(availableOrders);
updateAddOrderPaginationControls();
})
.catch(err => {
console.error(err);
if (tbody) {
tbody.innerHTML = `
<tr>
<td colspan="8" class="empty-state">Unable to load available orders</td>
</tr>
`;
}
updateAddOrderPaginationControls();
});
}
/* ---------- Renderers ---------- */ /* ---------- Renderers ---------- */
function renderPaymentTable(list){ function renderPaymentTable(list){
const body = document.getElementById('paymentTableBody'); const body = document.getElementById('paymentTableBody');
@@ -2543,11 +2600,13 @@ function openAddOrderModal() {
if (!currentEditEntry) return; if (!currentEditEntry) return;
document.getElementById('addOrderModal').classList.add('modal-open'); document.getElementById('addOrderModal').classList.add('modal-open');
// नेहमी इथेच ताजे orders load कर
addOrderCurrentPage = 1; addOrderCurrentPage = 1;
renderAddOrderModal(availableOrders); loadAvailableOrdersForAddModal();
updateAddOrderPaginationControls();
} }
function closeAddOrderModal() { function closeAddOrderModal() {
document.getElementById('addOrderModal').classList.remove('modal-open'); document.getElementById('addOrderModal').classList.remove('modal-open');
} }

View File

@@ -748,10 +748,13 @@
<script> <script>
// Pagination state // Pagination state
let currentPage = 1; let currentPage = 1;
const itemsPerPage = 10; const itemsPerPage = 10;
let allOrders = @json($orders); let allOrders = @json($orders);
let filteredOrders = [...allOrders]; let filteredOrders = [...allOrders];
console.log('ORDERS SAMPLE:', allOrders[0]);
// Status icon helper functions // Status icon helper functions
function getInvoiceStatusIcon(status) { function getInvoiceStatusIcon(status) {
@@ -932,9 +935,10 @@
filteredOrders = allOrders.filter(order => { filteredOrders = allOrders.filter(order => {
const matchesSearch = !searchTerm || const matchesSearch = !searchTerm ||
(order.order_id && order.order_id.toLowerCase().includes(searchTerm)) || order.order_id?.toLowerCase().includes(searchTerm) ||
(order.markList?.company_name && order.markList.company_name.toLowerCase().includes(searchTerm)) || order.mark_list?.company_name?.toLowerCase().includes(searchTerm) ||
(order.invoice?.invoice_number && order.invoice.invoice_number.toLowerCase().includes(searchTerm)); order.invoice?.invoice_number?.toLowerCase().includes(searchTerm);
const matchesStatus = !statusFilter || const matchesStatus = !statusFilter ||
(order.invoice?.status && order.invoice.status.toLowerCase() === statusFilter); (order.invoice?.status && order.invoice.status.toLowerCase() === statusFilter);
@@ -1049,7 +1053,7 @@
const paginatedItems = filteredOrders.slice(startIndex, endIndex); const paginatedItems = filteredOrders.slice(startIndex, endIndex);
paginatedItems.forEach(order => { paginatedItems.forEach(order => {
const mark = order.markList || null; const mark = order.mark_list || null;
const invoice = order.invoice || null; const invoice = order.invoice || null;
const shipment = order.shipments?.[0] || null; const shipment = order.shipments?.[0] || null;
const invoiceStatus = (invoice?.status || '').toLowerCase(); const invoiceStatus = (invoice?.status || '').toLowerCase();