Merge pull request #19 from WDI-Ideas/sayaliP

Sayali p
This commit is contained in:
CodewithSayali
2024-05-28 18:57:50 +05:30
committed by GitHub
22 changed files with 1676 additions and 668 deletions

View File

@@ -0,0 +1,40 @@
<?php
namespace App\Exports;
use App\Models\EventbriteUser;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
// use Maatwebsite\Excel\Excel;
use Maatwebsite\Excel\Concerns\WithStyles;
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
class EventbriteUsersExport implements FromCollection, WithHeadings , WithStyles
{
/**
* @return \Illuminate\Support\Collection
*/
public function collection()
{
return EventbriteUser::select('orderId', 'user_email', 'passport_id', 'quantity', 'order_date')->get();
}
public function headings(): array
{
return [
'Order ID',
'User Email',
'Passport ID',
'Quantity',
'Order Date',
];
}
public function styles(Worksheet $sheet)
{
return [
// Style the first row (headings)
1 => ['font' => ['bold' => true]],
];
}
}

View File

@@ -0,0 +1,49 @@
<?php
namespace App\Exports;
use App\Models\admin\ManagePassport;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
class PassportExport implements FromCollection , WithHeadings
{
/**
* @return \Illuminate\Support\Collection
*/
public function collection()
{
return ManagePassport::select(
'id',
'passport_name',
'description',
'activated_on',
'expiry_on',
'is_popular',
'capacity',
'coupon_code',
'price',
'is_active',
'is_expired',
)->get();
}
//function header in excel
public function headings(): array
{
return [
'Id',
'Passport name',
'Description',
'Activated date',
'Expiry date',
'is_popular',
'Capacity',
'Coupon code',
'Price',
'is_active',
'is_expired',
];
}
}

View File

@@ -0,0 +1,36 @@
<?php
namespace App\Exports;
use Maatwebsite\Excel\Concerns\FromCollection;
use App\Models\IamPrincipal;
use Maatwebsite\Excel\Concerns\WithHeadings;
class customer_export implements FromCollection , WithHeadings
{
/**
* @return \Illuminate\Support\Collection
*/
public function collection()
{
return IamPrincipal::select(
'first_name',
'email_address',
'date_of_birth',
'phone_number'
)->get();
}
//function header in excel
public function headings(): array
{
return [
'first_name',
'email_address',
'date_of_birth',
'phone_number'
];
}
}

View File

@@ -0,0 +1,56 @@
<?php
namespace App\Exports;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use App\Models\IamPrincipal;
use Illuminate\Support\Collection;
class CustomerExportSelected implements FromCollection, WithHeadings
{
protected $ids;
public function __construct($ids)
{
$this->ids = $ids;
}
/**
* @return \Illuminate\Support\Collection
*/
public function collection()
{
$selectedCareIds = explode(',', $this->ids);
$selected_customer = IamPrincipal::whereIn('id', $selectedCareIds)
->orderBy('id', 'Desc')
->select(
'first_name',
'email_address',
'date_of_birth',
'phone_number'
)
->get();
return $selected_customer;
}
/**
* @return array
*/
public function headings(): array
{
return [
'first_name',
'email_address',
'date_of_birth',
'phone_number'
];
}
}

View File

@@ -0,0 +1,47 @@
<?php
namespace App\Exports;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithStyles;
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
class dashboard_export_reedeem_vouchers implements FromCollection , WithHeadings
{
/**
* @return \Illuminate\Support\Collection
*/
protected $redeemedVouchers;
public function __construct(array $redeemedVouchers)
{
$this->redeemedVouchers = collect($redeemedVouchers);
}
public function collection()
{
// dd($redeemedVouchers);
return $this->redeemedVouchers->map(function ($transaction) {
return [
$transaction['customer']['first_name'],
$transaction['passport_data']['passport_name'],
$transaction['passport_vouchers']['coupon_name'],
$transaction['redeem_date']
];
});
}
public function headings(): array
{
return [
'Name',
'Passport Name',
'Restaurant',
'Reededm Date'
];
}
}

View File

@@ -0,0 +1,49 @@
<?php
namespace App\Exports;
use Maatwebsite\Excel\Concerns\FromCollection;
use App\Models\IamPrincipal;
use App\Models\OrderedPassport;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithStyles;
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
class dashboard_export_user implements FromCollection , WithHeadings , WithStyles
{
protected $recentTransactions;
public function __construct(array $recentTransactions)
{
$this->recentTransactions = collect($recentTransactions);
}
public function collection()
{
return $this->recentTransactions->map(function ($transaction) {
return [
$transaction['iam_principal']['first_name'] ?? 'Unknown',
$transaction['is_cart_order'] == 1 ? $transaction['carts']['passport']['passport_name'] : $transaction['order_passport']['passport_name'],
$transaction['is_cart_order'] == 1 ? $transaction['carts']['passport']['price'] : $transaction['order_passport']['price'],
];
});
}
public function headings(): array
{
return [
'Name',
'Passport Name',
'Amount',
];
}
public function styles(Worksheet $sheet)
{
return [
// Style the first row (headings)
1 => ['font' => ['bold' => true]],
];
}
}

View File

@@ -0,0 +1,58 @@
<?php
namespace App\Exports;
use Maatwebsite\Excel\Concerns\FromCollection;
use App\Models\OrderedPassport;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithStyles;
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
class dashboard_selected_export_user implements FromCollection , WithHeadings , WithStyles
{
protected $ids;
public function __construct( $ids)
{
$this->ids = $ids;
}
/**
* @return \Illuminate\Support\Collection
*/
public function collection()
{
$selectedCareIds = explode(',', $this->ids);
return OrderedPassport::with('order_passport', 'carts.passport', 'iamPrincipal')
->whereIn('id', $selectedCareIds)
->get()
->map(function ($transaction) {
return [
'Name' => $transaction->iamPrincipal->first_name ?? 'Unknown',
'Passport Name' => $transaction->is_cart_order == 1 ? $transaction->carts->passport->passport_name : $transaction->order_passport->passport_name,
'Amount' => $transaction->is_cart_order == 1 ? $transaction->carts->passport->price : $transaction->order_passport->price,
];
});
}
public function headings(): array
{
return [
'Name',
'Passport Name',
'Amount',
];
}
public function styles(Worksheet $sheet)
{
return [
// Style the first row (headings)
1 => ['font' => ['bold' => true]],
];
}
}

View File

@@ -9,8 +9,14 @@ use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\DB;
use Maatwebsite\Excel\Facades\Excel;
use App\Models\OrderedPassport;
use App\Exports\customer_export;
use App\Exports\customer_export_selected;
use Exception;
use PDF;
class ManageCustomerController extends Controller
{
@@ -20,23 +26,178 @@ class ManageCustomerController extends Controller
// return view('Admin.pages.manage_users.manage_customer.customer');
// }
public function index()
{
// public function index()
// {
try {
$customers = IamPrincipal::where('principal_type_xid', 3)->orderBy('created_at', 'desc')->get();
// try {
// $customers = IamPrincipal::where('principal_type_xid', 3)->orderBy('created_at', 'desc')->get();
// // foreach ($customers as $customer) {
// // $activePassportCount = OrderedPassport::where('iam_principal_xid', $customer->id)
// // ->where('is_active', 1) // Assuming 'status' field indicates the status of the passport
// // ->count();
// // $customer->activePassportCount = $activePassportCount;
// // }
// return view('Admin.pages.manage_users.manage_customer.customer', compact('customers'));
// } catch (Exception $e) {
// Log::error("Manage Voucher Page Not Load " . $e->getMessage());
// return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
// }
// }
public function index()
{
try {
// Eager load the state relationship for all customers
$customers = IamPrincipal::where('principal_type_xid', 3)
->with('state')
->orderBy('created_at', 'desc')
->get();
// foreach ($customers as $customer) {
// $activePassportCount = OrderedPassport::where('iam_principal_xid', $customer->id)
// ->where('is_active', 1) // Assuming 'status' field indicates the status of the passport
// ->count();
// $customer->activePassportCount = $activePassportCount;
// }
return view('Admin.pages.manage_users.manage_customer.customer', compact('customers'));
} catch (Exception $e) {
Log::error("Manage Voucher Page Not Load " . $e->getMessage());
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
return view('Admin.pages.manage_users.manage_customer.customer', compact('customers'));
} catch (Exception $e) {
Log::error("Manage Voucher Page Not Load " . $e->getMessage());
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
}
public function view_customer($id)
{
try {
$customers_data = IamPrincipal::findOrFail($id);
return view('Admin.pages.manage_users.manage_customer.view_customer_details', compact('customers_data'));
} catch (Exception $e) {
Log::error("Manage Voucher Page Not Load " . $e->getMessage());
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
}
public function edit_customer($id)
{
try {
$customers_data = IamPrincipal::findOrFail($id);
return view('Admin.pages.manage_users.manage_customer.edit_customer', compact('customers_data'));
} catch (Exception $e) {
Log::error("Manage Voucher Page Not Load " . $e->getMessage());
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
}
public function update(Request $request)
{
try {
DB::beginTransaction();
$customer_data = IamPrincipal::where('id', $request->customer_id)->first();
$customer_data->first_name = $request->input('name');
$customer_data->last_name = $request->input('last_name');
$customer_data->phone_number = $request->input('phone');
$customer_data->email_address = $request->input('email_id');
$customer_data->save();
DB::commit();
return jsonResponseWithSuccessMessage(__('success.update_data'));
} catch (Exception $e) {
DB::rollBack();
Log::error("updateCustomerNewsArticle Services Page Load Failed " . $e->getMessage());
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
}
public function archive_customer()
{
/*
Created By : Sayali Parab
Created at : 28 May 2024
Use : To Get archieve customer.
*/
try {
$customers = IamPrincipal::where('principal_type_xid', 3)->onlyTrashed()->latest()->get();
return view('Admin.pages.manage_users.manage_customer.archive_manage_customer', compact('customers'));
} catch (Exception $e) {
Log::error("Manage Voucher Page Not Load " . $e->getMessage());
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
}
public function delete_customer($id)
{
try {
DB::beginTransaction();
$passport = IamPrincipal::find($id);
$passport->one_signal_player_id = null;
$passport->deleted_by_admin = 1;
$passport->save();
$passport->delete();
// dd($passport);
DB::commit();
return response()->json(['success' => true, 'status' => 200]);
} catch (Exception $e) {
DB::rollBack();
Log::error("delete_passport function Load Failed " . $e->getMessage());
return response()->json(['success' => false, 'status' => 500, 'message' => __('auth.something_went_wrong')]);
}
}
// public function download_pdf($id)
// {
// // try {
// $customers_data = IamPrincipal::findOrFail($id);
// // dd($customers_data);
// $data = [
// 'customers_data' => $customers_data
// ];
// $pdf = PDF::loadView('Admin.pages.manage_users.manage_customer.view_customer_details_pdf', $data);
// return $pdf->download('customer_details.pdf');
// // } catch (Exception $e) {
// // Log::error("Manage Voucher Page Not Load " . $e->getMessage());
// // return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
// // }
// }
public function download_pdf($id)
{
try {
$customers_data = IamPrincipal::findOrFail($id);
$data = [
'customers_data' => $customers_data
];
$pdf = PDF::loadView('Admin.pages.manage_users.manage_customer.view_customer_details_pdf', $data);
return $pdf->download('customer_details.pdf');
} catch (Exception $e) {
Log::error("Error generating PDF: " . $e->getMessage());
return response()->json(['error' => __('auth.something_went_wrong')], 500);
}
}
public function exportSelectedCustomer(Request $request)
{
try {
if ($request->has('all_id')) {
return Excel::download(new customer_export, 'Passport_data.xlsx');
}
$ids = $request->selected_id;
$fileName = 'selected_customer_data.xlsx';
return Excel::download(new customer_export_selected($ids), $fileName);
} catch (\Exception $e) {
return response()->json(['error' => 'Export failed. Something went wrong.'], 500);
}
}
}

View File

@@ -8,9 +8,11 @@ use Illuminate\Notifications\Notifiable;
use Tymon\JWTAuth\Contracts\JWTSubject;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use App\Models\admin\ManageFeedback;
use App\Models\admin\ManageModuleLink;
use App\Models\admin\ManageModule;
use App\Models\ManageFeedback;
use App\Models\ManageModuleLink;
use App\Models\ManageModule;
use App\Models\ManageState;
use App\Models\OrderedPassport;
@@ -40,6 +42,10 @@ class IamPrincipal extends Authenticatable implements JWTSubject
'notification_status',
'deleted_by_admin'
];
public function state()
{
return $this->belongsTo(ManageState::class, 'state_xid', 'id');
}
public function moduleLinks()
{

View File

@@ -8,4 +8,20 @@ use Illuminate\Database\Eloquent\Model;
class ManageState extends Model
{
use HasFactory;
protected $table = 'manage_states';
// protected $dates = ['deleted_at'];
protected $fillable = [
' id ',
'name',
'is_active',
'email_address',
'created_by',
'modified_by',
'deleted_at',
'created_at',
'updated_at ',
];
}

View File

@@ -10,12 +10,13 @@
"license": "MIT",
"require": {
"php": "^8.2",
"barryvdh/laravel-dompdf": "^2.2",
"laravel/framework": "^11.0",
"laravel/jetstream": "^5.1",
"laravel/sanctum": "^4.0",
"laravel/tinker": "^2.9",
"livewire/livewire": "^3.0",
"maatwebsite/excel": "^3.1",
"maatwebsite/excel": "^1.1",
"tymon/jwt-auth": "^2.1"
},
"require-dev": {

654
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": "25b41f7bfd01bd56e5971027152fd1fa",
"content-hash": "e805067d0b9c7a47812cc3d4b85e8b42",
"packages": [
{
"name": "bacon/bacon-qr-code",
@@ -60,6 +60,83 @@
},
"time": "2024-04-18T11:16:25+00:00"
},
{
"name": "barryvdh/laravel-dompdf",
"version": "v2.2.0",
"source": {
"type": "git",
"url": "https://github.com/barryvdh/laravel-dompdf.git",
"reference": "c96f90c97666cebec154ca1ffb67afed372114d8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/barryvdh/laravel-dompdf/zipball/c96f90c97666cebec154ca1ffb67afed372114d8",
"reference": "c96f90c97666cebec154ca1ffb67afed372114d8",
"shasum": ""
},
"require": {
"dompdf/dompdf": "^2.0.7",
"illuminate/support": "^6|^7|^8|^9|^10|^11",
"php": "^7.2 || ^8.0"
},
"require-dev": {
"larastan/larastan": "^1.0|^2.7.0",
"orchestra/testbench": "^4|^5|^6|^7|^8|^9",
"phpro/grumphp": "^1 || ^2.5",
"squizlabs/php_codesniffer": "^3.5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
},
"laravel": {
"providers": [
"Barryvdh\\DomPDF\\ServiceProvider"
],
"aliases": {
"Pdf": "Barryvdh\\DomPDF\\Facade\\Pdf",
"PDF": "Barryvdh\\DomPDF\\Facade\\Pdf"
}
}
},
"autoload": {
"psr-4": {
"Barryvdh\\DomPDF\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Barry vd. Heuvel",
"email": "barryvdh@gmail.com"
}
],
"description": "A DOMPDF Wrapper for Laravel",
"keywords": [
"dompdf",
"laravel",
"pdf"
],
"support": {
"issues": "https://github.com/barryvdh/laravel-dompdf/issues",
"source": "https://github.com/barryvdh/laravel-dompdf/tree/v2.2.0"
},
"funding": [
{
"url": "https://fruitcake.nl",
"type": "custom"
},
{
"url": "https://github.com/barryvdh",
"type": "github"
}
],
"time": "2024-04-25T13:16:04+00:00"
},
{
"name": "brick/math",
"version": "0.12.1",
@@ -563,6 +640,68 @@
],
"time": "2024-02-05T11:56:58+00:00"
},
{
"name": "dompdf/dompdf",
"version": "v2.0.8",
"source": {
"type": "git",
"url": "https://github.com/dompdf/dompdf.git",
"reference": "c20247574601700e1f7c8dab39310fca1964dc52"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/dompdf/dompdf/zipball/c20247574601700e1f7c8dab39310fca1964dc52",
"reference": "c20247574601700e1f7c8dab39310fca1964dc52",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-mbstring": "*",
"masterminds/html5": "^2.0",
"phenx/php-font-lib": ">=0.5.4 <1.0.0",
"phenx/php-svg-lib": ">=0.5.2 <1.0.0",
"php": "^7.1 || ^8.0"
},
"require-dev": {
"ext-json": "*",
"ext-zip": "*",
"mockery/mockery": "^1.3",
"phpunit/phpunit": "^7.5 || ^8 || ^9",
"squizlabs/php_codesniffer": "^3.5"
},
"suggest": {
"ext-gd": "Needed to process images",
"ext-gmagick": "Improves image processing performance",
"ext-imagick": "Improves image processing performance",
"ext-zlib": "Needed for pdf stream compression"
},
"type": "library",
"autoload": {
"psr-4": {
"Dompdf\\": "src/"
},
"classmap": [
"lib/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL-2.1"
],
"authors": [
{
"name": "The Dompdf Community",
"homepage": "https://github.com/dompdf/dompdf/blob/master/AUTHORS.md"
}
],
"description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter",
"homepage": "https://github.com/dompdf/dompdf",
"support": {
"issues": "https://github.com/dompdf/dompdf/issues",
"source": "https://github.com/dompdf/dompdf/tree/v2.0.8"
},
"time": "2024-04-29T13:06:17+00:00"
},
{
"name": "dragonmantank/cron-expression",
"version": "v3.3.3",
@@ -1883,31 +2022,34 @@
},
{
"name": "lcobucci/clock",
"version": "2.2.0",
"version": "3.2.0",
"source": {
"type": "git",
"url": "https://github.com/lcobucci/clock.git",
"reference": "fb533e093fd61321bfcbac08b131ce805fe183d3"
"reference": "6f28b826ea01306b07980cb8320ab30b966cd715"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/lcobucci/clock/zipball/fb533e093fd61321bfcbac08b131ce805fe183d3",
"reference": "fb533e093fd61321bfcbac08b131ce805fe183d3",
"url": "https://api.github.com/repos/lcobucci/clock/zipball/6f28b826ea01306b07980cb8320ab30b966cd715",
"reference": "6f28b826ea01306b07980cb8320ab30b966cd715",
"shasum": ""
},
"require": {
"php": "^8.0",
"stella-maris/clock": "^0.1.4"
"php": "~8.2.0 || ~8.3.0",
"psr/clock": "^1.0"
},
"provide": {
"psr/clock-implementation": "1.0"
},
"require-dev": {
"infection/infection": "^0.26",
"lcobucci/coding-standard": "^8.0",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-deprecation-rules": "^0.12",
"phpstan/phpstan-phpunit": "^0.12",
"phpstan/phpstan-strict-rules": "^0.12",
"phpunit/phpunit": "^9.5"
"infection/infection": "^0.27",
"lcobucci/coding-standard": "^11.0.0",
"phpstan/extension-installer": "^1.3.1",
"phpstan/phpstan": "^1.10.25",
"phpstan/phpstan-deprecation-rules": "^1.1.3",
"phpstan/phpstan-phpunit": "^1.3.13",
"phpstan/phpstan-strict-rules": "^1.5.1",
"phpunit/phpunit": "^10.2.3"
},
"type": "library",
"autoload": {
@@ -1928,7 +2070,7 @@
"description": "Yet another clock abstraction",
"support": {
"issues": "https://github.com/lcobucci/clock/issues",
"source": "https://github.com/lcobucci/clock/tree/2.2.0"
"source": "https://github.com/lcobucci/clock/tree/3.2.0"
},
"funding": [
{
@@ -1940,47 +2082,45 @@
"type": "patreon"
}
],
"time": "2022-04-19T19:34:17+00:00"
"time": "2023-11-17T17:00:27+00:00"
},
{
"name": "lcobucci/jwt",
"version": "4.0.4",
"version": "4.3.0",
"source": {
"type": "git",
"url": "https://github.com/lcobucci/jwt.git",
"reference": "55564265fddf810504110bd68ca311932324b0e9"
"reference": "4d7de2fe0d51a96418c0d04004986e410e87f6b4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/lcobucci/jwt/zipball/55564265fddf810504110bd68ca311932324b0e9",
"reference": "55564265fddf810504110bd68ca311932324b0e9",
"url": "https://api.github.com/repos/lcobucci/jwt/zipball/4d7de2fe0d51a96418c0d04004986e410e87f6b4",
"reference": "4d7de2fe0d51a96418c0d04004986e410e87f6b4",
"shasum": ""
},
"require": {
"ext-hash": "*",
"ext-json": "*",
"ext-mbstring": "*",
"ext-openssl": "*",
"lcobucci/clock": "^2.0",
"ext-sodium": "*",
"lcobucci/clock": "^2.0 || ^3.0",
"php": "^7.4 || ^8.0"
},
"require-dev": {
"infection/infection": "^0.20",
"infection/infection": "^0.21",
"lcobucci/coding-standard": "^6.0",
"mikey179/vfsstream": "^1.6",
"phpbench/phpbench": "^0.17",
"mikey179/vfsstream": "^1.6.7",
"phpbench/phpbench": "^1.2",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-deprecation-rules": "^0.12",
"phpstan/phpstan-phpunit": "^0.12",
"phpstan/phpstan-strict-rules": "^0.12",
"phpstan/phpstan": "^1.4",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"phpstan/phpstan-strict-rules": "^1.0",
"phpunit/php-invoker": "^3.1",
"phpunit/phpunit": "^9.4"
"phpunit/phpunit": "^9.5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.0-dev"
}
},
"autoload": {
"psr-4": {
"Lcobucci\\JWT\\": "src"
@@ -2004,7 +2144,7 @@
],
"support": {
"issues": "https://github.com/lcobucci/jwt/issues",
"source": "https://github.com/lcobucci/jwt/tree/4.0.4"
"source": "https://github.com/lcobucci/jwt/tree/4.3.0"
},
"funding": [
{
@@ -2016,7 +2156,7 @@
"type": "patreon"
}
],
"time": "2021-09-28T19:18:28+00:00"
"time": "2023-01-02T13:28:00+00:00"
},
{
"name": "league/commonmark",
@@ -2470,275 +2610,6 @@
],
"time": "2024-05-21T13:39:04+00:00"
},
{
"name": "maatwebsite/excel",
"version": "3.1.55",
"source": {
"type": "git",
"url": "https://github.com/SpartnerNL/Laravel-Excel.git",
"reference": "6d9d791dcdb01a9b6fd6f48d46f0d5fff86e6260"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/SpartnerNL/Laravel-Excel/zipball/6d9d791dcdb01a9b6fd6f48d46f0d5fff86e6260",
"reference": "6d9d791dcdb01a9b6fd6f48d46f0d5fff86e6260",
"shasum": ""
},
"require": {
"composer/semver": "^3.3",
"ext-json": "*",
"illuminate/support": "5.8.*||^6.0||^7.0||^8.0||^9.0||^10.0||^11.0",
"php": "^7.0||^8.0",
"phpoffice/phpspreadsheet": "^1.18",
"psr/simple-cache": "^1.0||^2.0||^3.0"
},
"require-dev": {
"laravel/scout": "^7.0||^8.0||^9.0||^10.0",
"orchestra/testbench": "^6.0||^7.0||^8.0||^9.0",
"predis/predis": "^1.1"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Maatwebsite\\Excel\\ExcelServiceProvider"
],
"aliases": {
"Excel": "Maatwebsite\\Excel\\Facades\\Excel"
}
}
},
"autoload": {
"psr-4": {
"Maatwebsite\\Excel\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Patrick Brouwers",
"email": "patrick@spartner.nl"
}
],
"description": "Supercharged Excel exports and imports in Laravel",
"keywords": [
"PHPExcel",
"batch",
"csv",
"excel",
"export",
"import",
"laravel",
"php",
"phpspreadsheet"
],
"support": {
"issues": "https://github.com/SpartnerNL/Laravel-Excel/issues",
"source": "https://github.com/SpartnerNL/Laravel-Excel/tree/3.1.55"
},
"funding": [
{
"url": "https://laravel-excel.com/commercial-support",
"type": "custom"
},
{
"url": "https://github.com/patrickbrouwers",
"type": "github"
}
],
"time": "2024-02-20T08:27:10+00:00"
},
{
"name": "maennchen/zipstream-php",
"version": "3.1.0",
"source": {
"type": "git",
"url": "https://github.com/maennchen/ZipStream-PHP.git",
"reference": "b8174494eda667f7d13876b4a7bfef0f62a7c0d1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/b8174494eda667f7d13876b4a7bfef0f62a7c0d1",
"reference": "b8174494eda667f7d13876b4a7bfef0f62a7c0d1",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"ext-zlib": "*",
"php-64bit": "^8.1"
},
"require-dev": {
"ext-zip": "*",
"friendsofphp/php-cs-fixer": "^3.16",
"guzzlehttp/guzzle": "^7.5",
"mikey179/vfsstream": "^1.6",
"php-coveralls/php-coveralls": "^2.5",
"phpunit/phpunit": "^10.0",
"vimeo/psalm": "^5.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.0"
},
"funding": [
{
"url": "https://github.com/maennchen",
"type": "github"
},
{
"url": "https://opencollective.com/zipstream",
"type": "open_collective"
}
],
"time": "2023-06-21T14:59:35+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": "mobiledetect/mobiledetectlib",
"version": "4.8.06",
@@ -2906,16 +2777,16 @@
},
{
"name": "nesbot/carbon",
"version": "3.3.1",
"version": "3.4.0",
"source": {
"type": "git",
"url": "https://github.com/briannesbitt/Carbon.git",
"reference": "8ff64b92c1b1ec84fcde9f8bb9ff2ca34cb8a77a"
"reference": "8eab8983c83c30e0bacbef8d311e3f3b8172727f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/8ff64b92c1b1ec84fcde9f8bb9ff2ca34cb8a77a",
"reference": "8ff64b92c1b1ec84fcde9f8bb9ff2ca34cb8a77a",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/8eab8983c83c30e0bacbef8d311e3f3b8172727f",
"reference": "8eab8983c83c30e0bacbef8d311e3f3b8172727f",
"shasum": ""
},
"require": {
@@ -3008,7 +2879,7 @@
"type": "tidelift"
}
],
"time": "2024-05-01T06:54:22+00:00"
"time": "2024-05-24T14:26:34+00:00"
},
{
"name": "nette/schema",
@@ -3371,111 +3242,6 @@
},
"time": "2024-05-08T12:18:48+00:00"
},
{
"name": "phpoffice/phpspreadsheet",
"version": "1.29.0",
"source": {
"type": "git",
"url": "https://github.com/PHPOffice/PhpSpreadsheet.git",
"reference": "fde2ccf55eaef7e86021ff1acce26479160a0fa0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/fde2ccf55eaef7e86021ff1acce26479160a0fa0",
"reference": "fde2ccf55eaef7e86021ff1acce26479160a0fa0",
"shasum": ""
},
"require": {
"ext-ctype": "*",
"ext-dom": "*",
"ext-fileinfo": "*",
"ext-gd": "*",
"ext-iconv": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-simplexml": "*",
"ext-xml": "*",
"ext-xmlreader": "*",
"ext-xmlwriter": "*",
"ext-zip": "*",
"ext-zlib": "*",
"ezyang/htmlpurifier": "^4.15",
"maennchen/zipstream-php": "^2.1 || ^3.0",
"markbaker/complex": "^3.0",
"markbaker/matrix": "^3.0",
"php": "^7.4 || ^8.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",
"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 || ^10.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",
"autoload": {
"psr-4": {
"PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Maarten Balliauw",
"homepage": "https://blog.maartenballiauw.be"
},
{
"name": "Mark Baker",
"homepage": "https://markbakeruk.net"
},
{
"name": "Franck Lefevre",
"homepage": "https://rootslabs.net"
},
{
"name": "Erik Tilt"
},
{
"name": "Adrien Crivelli"
}
],
"description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine",
"homepage": "https://github.com/PHPOffice/PhpSpreadsheet",
"keywords": [
"OpenXML",
"excel",
"gnumeric",
"ods",
"php",
"spreadsheet",
"xls",
"xlsx"
],
"support": {
"issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues",
"source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.29.0"
},
"time": "2023-06-14T22:48:31+00:00"
},
{
"name": "phpoption/phpoption",
"version": "1.9.2",
@@ -4320,27 +4086,38 @@
"time": "2024-04-27T21:32:50+00:00"
},
{
"name": "stella-maris/clock",
"version": "0.1.7",
"name": "sabberworm/php-css-parser",
"version": "v8.5.1",
"source": {
"type": "git",
"url": "https://github.com/stella-maris-solutions/clock.git",
"reference": "fa23ce16019289a18bb3446fdecd45befcdd94f8"
"url": "https://github.com/MyIntervals/PHP-CSS-Parser.git",
"reference": "4a3d572b0f8b28bb6fd016ae8bbfc445facef152"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/stella-maris-solutions/clock/zipball/fa23ce16019289a18bb3446fdecd45befcdd94f8",
"reference": "fa23ce16019289a18bb3446fdecd45befcdd94f8",
"url": "https://api.github.com/repos/MyIntervals/PHP-CSS-Parser/zipball/4a3d572b0f8b28bb6fd016ae8bbfc445facef152",
"reference": "4a3d572b0f8b28bb6fd016ae8bbfc445facef152",
"shasum": ""
},
"require": {
"php": "^7.0|^8.0",
"psr/clock": "^1.0"
"ext-iconv": "*",
"php": ">=5.6.20"
},
"require-dev": {
"phpunit/phpunit": "^5.7.27"
},
"suggest": {
"ext-mbstring": "for parsing UTF-8 CSS"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "9.0.x-dev"
}
},
"autoload": {
"psr-4": {
"StellaMaris\\Clock\\": "src"
"Sabberworm\\CSS\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -4349,22 +4126,29 @@
],
"authors": [
{
"name": "Andreas Heigl",
"role": "Maintainer"
"name": "Raphael Schweikert"
},
{
"name": "Oliver Klee",
"email": "github@oliverklee.de"
},
{
"name": "Jake Hotson",
"email": "jake.github@qzdesign.co.uk"
}
],
"description": "A pre-release of the proposed PSR-20 Clock-Interface",
"homepage": "https://gitlab.com/stella-maris/clock",
"description": "Parser for CSS Files written in PHP",
"homepage": "https://www.sabberworm.com/blog/2010/6/10/php-css-parser",
"keywords": [
"clock",
"datetime",
"point in time",
"psr20"
"css",
"parser",
"stylesheet"
],
"support": {
"source": "https://github.com/stella-maris-solutions/clock/tree/0.1.7"
"issues": "https://github.com/MyIntervals/PHP-CSS-Parser/issues",
"source": "https://github.com/MyIntervals/PHP-CSS-Parser/tree/v8.5.1"
},
"time": "2022-11-25T16:15:06+00:00"
"time": "2024-02-15T16:41:13+00:00"
},
{
"name": "symfony/clock",

View File

@@ -166,6 +166,10 @@ return [
Tymon\JWTAuth\Providers\LaravelServiceProvider::class,
// Ladumor\OneSignal\OneSignalServiceProvider::class,
// Maatwebsite\Excel\ExcelServiceProvider::class,
Barryvdh\DomPDF\ServiceProvider::class,
// Maatwebsite\Excel\ExcelServiceProvider::class,
])->toArray(),
@@ -180,14 +184,25 @@ return [
|
*/
// 'aliases' => Facade::defaultAliases()->merge([
// // 'Example' => App\Facades\Example::class,
// 'JWTAuth' => Tymon\JWTAuth\Facades\JWTAuth::class,
// 'JWTFactory' => Tymon\JWTAuth\Facades\JWTFactory::class,
// // 'OneSignal' => \Ladumor\OneSignal\OneSignal::class,
// 'PDF' => Barryvdh\DomPDF\Facade::class,
// // 'Excel' => Maatwebsite\Excel\Facades\Excel::class,
// ])->toArray(),
'aliases' => Facade::defaultAliases()->merge([
// 'Example' => App\Facades\Example::class,
'JWTAuth' => Tymon\JWTAuth\Facades\JWTAuth::class,
'JWTFactory' => Tymon\JWTAuth\Facades\JWTFactory::class,
// 'OneSignal' => \Ladumor\OneSignal\OneSignal::class,
// 'PDF' => Barryvdh\DomPDF\Facade::class,
'PDF' => Barryvdh\DomPDF\Facade::class,
// 'Excel' => Maatwebsite\Excel\Facades\Excel::class,
])->toArray(),
];

284
config/dompdf.php Normal file
View File

@@ -0,0 +1,284 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| Settings
|--------------------------------------------------------------------------
|
| Set some default values. It is possible to add all defines that can be set
| in dompdf_config.inc.php. You can also override the entire config file.
|
*/
'show_warnings' => false, // Throw an Exception on warnings from dompdf
'public_path' => null, // Override the public path if needed
/*
* Dejavu Sans font is missing glyphs for converted entities, turn it off if you need to show and £.
*/
'convert_entities' => true,
'options' => array(
/**
* The location of the DOMPDF font directory
*
* The location of the directory where DOMPDF will store fonts and font metrics
* Note: This directory must exist and be writable by the webserver process.
* *Please note the trailing slash.*
*
* Notes regarding fonts:
* Additional .afm font metrics can be added by executing load_font.php from command line.
*
* Only the original "Base 14 fonts" are present on all pdf viewers. Additional fonts must
* be embedded in the pdf file or the PDF may not display correctly. This can significantly
* increase file size unless font subsetting is enabled. Before embedding a font please
* review your rights under the font license.
*
* Any font specification in the source HTML is translated to the closest font available
* in the font directory.
*
* The pdf standard "Base 14 fonts" are:
* Courier, Courier-Bold, Courier-BoldOblique, Courier-Oblique,
* Helvetica, Helvetica-Bold, Helvetica-BoldOblique, Helvetica-Oblique,
* Times-Roman, Times-Bold, Times-BoldItalic, Times-Italic,
* Symbol, ZapfDingbats.
*/
"font_dir" => storage_path('fonts'), // advised by dompdf (https://github.com/dompdf/dompdf/pull/782)
/**
* The location of the DOMPDF font cache directory
*
* This directory contains the cached font metrics for the fonts used by DOMPDF.
* This directory can be the same as DOMPDF_FONT_DIR
*
* Note: This directory must exist and be writable by the webserver process.
*/
"font_cache" => storage_path('fonts'),
/**
* The location of a temporary directory.
*
* The directory specified must be writeable by the webserver process.
* The temporary directory is required to download remote images and when
* using the PDFLib back end.
*/
"temp_dir" => sys_get_temp_dir(),
/**
* ==== IMPORTANT ====
*
* dompdf's "chroot": Prevents dompdf from accessing system files or other
* files on the webserver. All local files opened by dompdf must be in a
* subdirectory of this directory. DO NOT set it to '/' since this could
* allow an attacker to use dompdf to read any files on the server. This
* should be an absolute path.
* This is only checked on command line call by dompdf.php, but not by
* direct class use like:
* $dompdf = new DOMPDF(); $dompdf->load_html($htmldata); $dompdf->render(); $pdfdata = $dompdf->output();
*/
"chroot" => realpath(base_path()),
/**
* Protocol whitelist
*
* Protocols and PHP wrappers allowed in URIs, and the validation rules
* that determine if a resouce may be loaded. Full support is not guaranteed
* for the protocols/wrappers specified
* by this array.
*
* @var array
*/
'allowed_protocols' => [
"file://" => ["rules" => []],
"http://" => ["rules" => []],
"https://" => ["rules" => []]
],
/**
* @var string
*/
'log_output_file' => null,
/**
* Whether to enable font subsetting or not.
*/
"enable_font_subsetting" => false,
/**
* The PDF rendering backend to use
*
* Valid settings are 'PDFLib', 'CPDF' (the bundled R&OS PDF class), 'GD' and
* 'auto'. 'auto' will look for PDFLib and use it if found, or if not it will
* fall back on CPDF. 'GD' renders PDFs to graphic files. {@link
* Canvas_Factory} ultimately determines which rendering class to instantiate
* based on this setting.
*
* Both PDFLib & CPDF rendering backends provide sufficient rendering
* capabilities for dompdf, however additional features (e.g. object,
* image and font support, etc.) differ between backends. Please see
* {@link PDFLib_Adapter} for more information on the PDFLib backend
* and {@link CPDF_Adapter} and lib/class.pdf.php for more information
* on CPDF. Also see the documentation for each backend at the links
* below.
*
* The GD rendering backend is a little different than PDFLib and
* CPDF. Several features of CPDF and PDFLib are not supported or do
* not make any sense when creating image files. For example,
* multiple pages are not supported, nor are PDF 'objects'. Have a
* look at {@link GD_Adapter} for more information. GD support is
* experimental, so use it at your own risk.
*
* @link http://www.pdflib.com
* @link http://www.ros.co.nz/pdf
* @link http://www.php.net/image
*/
"pdf_backend" => "CPDF",
/**
* PDFlib license key
*
* If you are using a licensed, commercial version of PDFlib, specify
* your license key here. If you are using PDFlib-Lite or are evaluating
* the commercial version of PDFlib, comment out this setting.
*
* @link http://www.pdflib.com
*
* If pdflib present in web server and auto or selected explicitely above,
* a real license code must exist!
*/
//"DOMPDF_PDFLIB_LICENSE" => "your license key here",
/**
* html target media view which should be rendered into pdf.
* List of types and parsing rules for future extensions:
* http://www.w3.org/TR/REC-html40/types.html
* screen, tty, tv, projection, handheld, print, braille, aural, all
* Note: aural is deprecated in CSS 2.1 because it is replaced by speech in CSS 3.
* Note, even though the generated pdf file is intended for print output,
* the desired content might be different (e.g. screen or projection view of html file).
* Therefore allow specification of content here.
*/
"default_media_type" => "screen",
/**
* The default paper size.
*
* North America standard is "letter"; other countries generally "a4"
*
* @see CPDF_Adapter::PAPER_SIZES for valid sizes ('letter', 'legal', 'A4', etc.)
*/
"default_paper_size" => "a4",
/**
* The default paper orientation.
*
* The orientation of the page (portrait or landscape).
*
* @var string
*/
'default_paper_orientation' => "portrait",
/**
* The default font family
*
* Used if no suitable fonts can be found. This must exist in the font folder.
* @var string
*/
"default_font" => "serif",
/**
* Image DPI setting
*
* This setting determines the default DPI setting for images and fonts. The
* DPI may be overridden for inline images by explictly setting the
* image's width & height style attributes (i.e. if the image's native
* width is 600 pixels and you specify the image's width as 72 points,
* the image will have a DPI of 600 in the rendered PDF. The DPI of
* background images can not be overridden and is controlled entirely
* via this parameter.
*
* For the purposes of DOMPDF, pixels per inch (PPI) = dots per inch (DPI).
* If a size in html is given as px (or without unit as image size),
* this tells the corresponding size in pt.
* This adjusts the relative sizes to be similar to the rendering of the
* html page in a reference browser.
*
* In pdf, always 1 pt = 1/72 inch
*
* Rendering resolution of various browsers in px per inch:
* Windows Firefox and Internet Explorer:
* SystemControl->Display properties->FontResolution: Default:96, largefonts:120, custom:?
* Linux Firefox:
* about:config *resolution: Default:96
* (xorg screen dimension in mm and Desktop font dpi settings are ignored)
*
* Take care about extra font/image zoom factor of browser.
*
* In images, <img> size in pixel attribute, img css style, are overriding
* the real image dimension in px for rendering.
*
* @var int
*/
"dpi" => 96,
/**
* Enable inline PHP
*
* If this setting is set to true then DOMPDF will automatically evaluate
* inline PHP contained within <script type="text/php"> ... </script> tags.
*
* Enabling this for documents you do not trust (e.g. arbitrary remote html
* pages) is a security risk. Set this option to false if you wish to process
* untrusted documents.
*
* @var bool
*/
"enable_php" => false,
/**
* Enable inline Javascript
*
* If this setting is set to true then DOMPDF will automatically insert
* JavaScript code contained within <script type="text/javascript"> ... </script> tags.
*
* @var bool
*/
"enable_javascript" => true,
/**
* Enable remote file access
*
* If this setting is set to true, DOMPDF will access remote sites for
* images and CSS files as required.
* This is required for part of test case www/test/image_variants.html through www/examples.php
*
* Attention!
* This can be a security risk, in particular in combination with DOMPDF_ENABLE_PHP and
* allowing remote access to dompdf.php or on allowing remote html code to be passed to
* $dompdf = new DOMPDF(, $dompdf->load_html(...,
* This allows anonymous users to download legally doubtful internet content which on
* tracing back appears to being downloaded by your server, or allows malicious php code
* in remote html pages to be executed by your server with your account privileges.
*
* @var bool
*/
"enable_remote" => true,
/**
* A ratio applied to the fonts height to be more like browsers' line height
*/
"font_height_ratio" => 1.1,
/**
* Use the HTML5 Lib parser
*
* @deprecated This feature is now always on in dompdf 2.x
* @var bool
*/
"enable_html5_parser" => true,
),
);

View File

@@ -70,12 +70,12 @@ $(document).on("click", "#customer_user_btn", function (e) {
if (result.status_code == 200) {
toastr.success('Customer Updated Sucessfully');
setTimeout(function() {
window.location.href = base_url + "/manage_customer";
window.location.href = base_url + "/manage-customer";
}, 2000);
} else {
toastr.error('Something Went Wrong');
setTimeout(function() {
window.location.href = base_url + "/manage_customer";
window.location.href = base_url + "/manage-customer";
}, 2000);
}
$('#customer_user_btn').attr('disabled', false);

View File

@@ -40,7 +40,7 @@ $(document).on("click", ".customer_archive", function (e) {
if (response.status == 200) {
toastr.success('Record has been archive');
setTimeout(function () {
window.location.href = base_url + "/manage_customer";
window.location.href = base_url + "/manage-customer";
}, 1000);
} else {
toastr.error("Something went wrong");
@@ -72,7 +72,7 @@ $(document).on("click", ".customer_unarchive", function (e) {
if (response.status == 200) {
toastr.success('Record has been ');
setTimeout(function () {
window.location.href = base_url + "/manage_customer";
window.location.href = base_url + "/manage-customer";
}, 1000);
} else {
toastr.error("Something went wrong");

View File

@@ -0,0 +1,96 @@
@extends('admin.layouts.master')
@section('content')
@php
$currentPage = 'manage-patient';
@endphp
<div class="layout-px-spacing">
<div class="middle-content container-xxl p-0">
<div class="row layout-top-spacing ">
<div class="top-tabel">
<div class="row">
<div class="col-md-4">
<!-- <h6 class="card-title">Archive patient list</h6> -->
<a class="d-flex align-items-center justify-content-center pl-2" href="{{url('/manage-customer')}}">
<img class="back-btn" src="{{ asset('public/assets/img/left-arrow.svg')}}">
<h6 class="card-title p-0">Archive Manage Customers</h6>
</a>
</div>
</div>
</div>
<div class="col-xl-12 col-lg-12 col-sm-12 layout-spacing">
<div class="widget-content widget-content-area br-8 position-btn" style="overflow: scroll;">
<table id="zero-config" class="table dt-table-hover" style="width:100%">
<thead class="text-center">
<tr>
<th class="text-start">Sr no</th>
<th class="text-start">Full Name</th>
<th class="text-start">User ID</th>
<th class="text-start">Email Id</th>
<th class="text-start">Date of birth</th>
<th class="text-start">Phone Number</th>
{{-- <th class="text-start">Location</th> --}}
<th>Action</th>
</tr>
</thead>
<tbody class="text-center">
@foreach ($customers as $customer)
<tr>
<td class="text-start">{{$loop->iteration }}</td>
<td class="text-start">{{$customer->first_name }}</td>
<td class="text-start">{{$customer->id }}</td>
<td class="text-start">{{$customer->email_address }}</td>
<td class="text-start">{{$customer->date_of_birth }}</td>
<td class="text-start">{{$customer->phone_number }}</td>
{{-- <td class="text-start">New York</td> --}}
<td class="view-transcation">
<a class="cust_unarchive_btn" data-id="{{$customer->id}}" href="" data-toggle="modal" data-target="#restore-modal">
<img src="{{ asset('public/assets/img/restore.svg')}}" />
<span>Restore</span>
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="restore-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-body">
<div class="modal-header">
<button type="button pointer" class="btn-close" data-dismiss="modal" aria-label="Close">
x
</button>
</div>
<input type="hidden" id="unarchive_id" name="unarchive_customer_id">
<p class="modal-text restore-modal-heading">Are you sure you want to<br>Unarchive?</p>
<div class="modal-btn d-flex ">
<a class="extra-btn pointer" data-dismiss="modal">No</a>
<a class="download-btn-custom customer_unarchive" href="">Yes, Unarchive</a>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('section_script')
<script src="{{ asset('public/assets/js/admin/manage_customer/main.js')}}"></script>
<script>
$(document).ready(function () {
$('<button><a class="extra-btn width-max-content" href="{{ route('manage.customer') }}">View List</a></button>').insertBefore("#zero-config_filter label");
});
</script>
@endsection

View File

@@ -4,7 +4,53 @@
@php
$currentPage = 'manage-patient';
@endphp
<style>
/* CSS for action icons */
.actions {
display: flex;
gap: 10px;
justify-content: center;
align-items: center;
}
.actions a {
margin: 0 5px;
/* Space between icons */
}
.actions img {
width: 20px;
/* Adjust the size as needed */
height: 20px;
/* Adjust the size as needed */
cursor: pointer;
transition: transform 0.2s;
}
.actions img:hover {
transform: scale(1.2);
}
/* Ensuring icons are properly aligned in their table cells */
td.actions {
display: flex;
justify-content: center;
align-items: center;
}
/* Additional global styles for consistency */
table td,
table th {
vertical-align: middle;
text-align: center;
}
/* Ensuring the table does not overflow */
table {
width: 100%;
overflow-x: auto;
}
</style>
<div class="layout-px-spacing">
@@ -22,221 +68,185 @@ $currentPage = 'manage-patient';
</div>
<div class="col-xl-12 col-lg-12 col-sm-12 layout-spacing">
<div class="widget-content widget-content-area br-8 position-btn" style="overflow: auto;">
<table id="zero-config" class="table dt-table-hover" style="width:100%">
<thead class="text-center">
<th class="w-10px pe-2">
<form action="{{ route('export-selected-customer') }}" method="POST" id="customer-form">
@csrf
<input type="hidden" name="selected_id" id="ids" disabled>
<input type="hidden" name="all_id" id="all_id" value="all" disabled>
<table id="zero-config" class="table dt-table-hover" style="width:100%">
<thead class="text-center">
<!-- <th class="w-10px pe-2">
<div class="form-check form-check-sm form-check-custom form-check-solid me-3">
<input class="form-check-input" type="checkbox" data-kt-check="true" data-kt-check-target="#kt_table_users .form-check-input" value="1" />
</div>
</th>
<th class="text-start">Sr no</th>
<th class="text-start">Full Name</th>
<th class="text-start">User ID</th>
<th class="text-start">Email Id</th>
<th class="text-start">Date of birth</th>
<th class="text-start">Phone Number</th>
<th class="text-start">Location</th>
<th class="text-start">Passports</th>
<th class="no-content">Action</th>
</tr>
</thead>
<tbody class="text-center">
@foreach ($customers as $customer)
<tr>
<td>
<div class="form-check form-check-sm form-check-custom form-check-solid">
<input class="form-check-input" type="checkbox" id="customer_checkbox_ids" name="customer_ids" value="{{ $customer->id }}" />
</th> -->
<th class="w-10px pe-2">
<div class="form-check form-check-sm form-check-custom form-check-solid me-3">
<input class="form-check-input" type="checkbox" name="customer_ids" id="select-all-ids" />
</div>
</td>
<td class="text-start">{{ $loop->iteration }}</td>
<td class="text-start">{{ $customer->first_name }}</td>
<td class="text-start">{{ $customer->id }}</td>
<td class="text-start">{{ $customer->address_line1 }}</td>
<td class="text-start">{{ $customer->email_address }}</td>
<td>{{ \Carbon\Carbon::parse($customer->date_of_birth)->format('d/m/Y') }}</td>
<td class="text-start">{{ $customer->phone_number }}</td>
<td class="text-start">{{ $customer->activePassportCount }}</td>
<td class="text-start">
<a class="view-btn" href="{{ url('/manage_customer_passport/' . $customer->id) }}">View</a>
</td>
<td>
<div class="dropout">
<button class="more">
<span></span>
<span></span>
<span></span>
</button>
<ul>
<li>
<a href="{{ url('/manage_customer_view/' . $customer->id) }}">
<img src="{{ asset('public/assets/img/view.svg') }}" />
<span>View</span>
</a>
</li>
<li>
<a class="cust_archive_btn" data-id="{{ $customer->id }}" data-toggle="modal" data-target="#archive-modal">
<img src="{{ asset('public/assets/img/archive.svg') }}" />
<span>Archive</span>
</a>
</li>
<li>
<a href="{{ url('/manage_customer_edit/' . $customer->id) }}">
<img src="{{ asset('public/assets/img/edit.svg') }}" />
<span>Edit</span>
</a>
</li>
</ul>
</div>
</td>
</tr>
@endforeach
</th>
<th class="text-start">Sr no</th>
<th class="text-start">Full Name</th>
<th class="text-start">User ID</th>
<th class="text-start">Email Id</th>
<th class="text-start">Date of birth</th>
<th class="text-start">Phone Number</th>
<th class="text-start">Location</th>
<!-- <th class="text-start">Passports</th> -->
<th class="no-content">Action</th>
</tr>
</thead>
<tbody class="text-center">
@foreach ($customers as $customer)
<tr>
<td>
<div class="form-check form-check-sm form-check-custom form-check-solid">
<input class="form-check-input" type="checkbox" id="customer_checkbox_ids" name="customer_ids" value="{{ $customer->id }}" />
</div>
</td>
<td class="text-start">{{ $loop->iteration }}</td>
<!-- <td class="text-start">{{ $customer->first_name }}</td> -->
<td class="text-start">{{ $customer->first_name }} {{ $customer->last_name }}</td>
<td class="text-start">{{ $customer->id }}</td>
<td class="text-start">{{ $customer->email_address }}</td>
<td>{{ \Carbon\Carbon::parse($customer->date_of_birth)->format('d/m/Y') }}</td>
<td class="text-start">{{ $customer->phone_number }}</td>
<td>{{ $customer->state ? $customer->state->name : 'No state assigned' }}</td>
<!-- <td class="text-start">{{ $customer->address_line1 }}</td> -->
<!-- <td class="text-start">{{ $customer->activePassportCount }}</td> -->
<td class="actions">
<a href="{{ url('/manage_customer_view/' . $customer->id) }}">
<img src="{{ asset('public/assets/img/view.svg') }}" alt="View" title="View" />
</a>
<a href="{{ url('/manage_customer_edit/' . $customer->id) }}">
<img src="{{ asset('public/assets/img/edit.svg') }}" alt="Edit" title="Edit" />
</a>
<a class="cust_archive_btn" data-id="{{ $customer->id }}" data-toggle="modal" data-target="#archive-modal">
<img src="{{ asset('public/assets/img/archive.svg') }}" alt="Archive" title="Archive" />
</a>
</td>
</tr>
@endforeach
</tbody>
<!-- <tr>
<td>
<div class="form-check form-check-sm form-check-custom form-check-solid">
<input class="form-check-input" type="checkbox" value="1" />
</div>
</td>
<td class="text-start">1</td>
<td class="text-start">Akanksha Surve</td>
<td class="text-start">1234567</td>
<td class="text-start">akanksha@gmail.com</td>
<td class="text-start">08/22/2023</td>
<td class="text-start">+5624878954</td>
<td class="text-start">New York</td>
<td class="text-start">
<a class="view-btn" href="passports.php" >View</a>
</td>
<td>
<div class="dropout">
<button class="more">
<span></span>
<span></span>
<span></span>
</button>
<ul>
<li>
<a href="view-customer.php">
<img src="../src/assets/img/view.svg" />
<span>View</span>
</a>
</li>
<li>
<a href="" data-toggle="modal" data-target="#archive-modal">
<img src="../src/assets/img/archive.svg" />
<span>Archive</span>
</a>
</li>
<li>
<a href="edit-manage-customers.php">
<img src="../src/assets/img/edit.svg" />
<span>Edit</span>
</a>
</li>
</ul>
</div>
</td>
</tr> -->
<!-- <tr>
<td>
<div class="form-check form-check-sm form-check-custom form-check-solid">
<input class="form-check-input" type="checkbox" value="1" />
</div>
</td>
<td class="text-start">1</td>
<td class="text-start">Akanksha Surve</td>
<td class="text-start">1234567</td>
<td class="text-start">akanksha@gmail.com</td>
<td class="text-start">08/22/2023</td>
<td class="text-start">+5624878954</td>
<td class="text-start">New York</td>
<td class="text-start">
<a class="view-btn" href="" data-toggle="modal">View</a>
</td>
<td>
<div class="dropout">
<button class="more">
<span></span>
<span></span>
<span></span>
</button>
<ul>
<li>
<a href="view-customer.php">
<img src="../src/assets/img/view.svg" />
<span>View</span>
</a>
</li>
<li>
<a href="" data-toggle="modal" data-target="#archive-modal">
<img src="../src/assets/img/archive.svg" />
<span>Archive</span>
</a>
</li>
<li>
<a href="edit-manage-customers.php">
<img src="../src/assets/img/edit.svg" />
<span>Edit</span>
</a>
</li>
</ul>
</div>
</td>
</tr> -->
<!-- <tr>
<td>
<div class="form-check form-check-sm form-check-custom form-check-solid">
<input class="form-check-input" type="checkbox" value="1" />
</div>
</td>
<td class="text-start">1</td>
<td class="text-start">Akanksha Surve</td>
<td class="text-start">1234567</td>
<td class="text-start">akanksha@gmail.com</td>
<td class="text-start">08/22/2023</td>
<td class="text-start">+5624878954</td>
<td class="text-start">New York</td>
<td class="text-start">
<a class="view-btn" href="" data-toggle="modal">View</a>
</td>
<td>
<div class="dropout">
<button class="more">
<span></span>
<span></span>
<span></span>
</button>
<ul>
<li>
<a href="view-customer.php">
<img src="../src/assets/img/view.svg" />
<span>View</span>
</a>
</li>
<li>
<a href="" data-toggle="modal" data-target="#archive-modal">
<img src="../src/assets/img/archive.svg" />
<span>Archive</span>
</a>
</li>
<li>
<a href="edit-manage-customers.php">
<img src="../src/assets/img/edit.svg" />
<span>Edit</span>
</a>
</li>
</ul>
</div>
</td>
</tr> -->
</table>
</form>
</tbody>
</table>
</div>
<!-- <div class="widget-content widget-content-area br-8 position-btn" style="overflow: auto;">
<form action="{{ route('export-selected-customer') }}" method="POST" id="customer-form">
@csrf
<input type="hidden" name="selected_id" id="ids" disabled>
<input type="hidden" name="all_id" id="all_id" value="all" disabled>
<table id="zero-config" class="table dt-table-hover" style="width:100%">
<thead class="text-center">
<th class="w-10px pe-2">
<div class="form-check form-check-sm form-check-custom form-check-solid me-3">
<input class="form-check-input" type="checkbox" name="customer_ids"
id="select-all-ids" />
</div>
</th>
<th class="text-start">Sr no</th>
<th class="text-start">Full Name</th>
<th class="text-start">User ID</th>
<th class="text-start">City</th>
<th class="text-start">Email Id</th>
<th class="text-start">Date of birth</th>
<th class="text-start">Phone Number</th>
<th class="text-start">No of Active Passport</th>
<th class="text-start">Passports</th>
<th class="no-content">Action</th>
</tr>
</thead>
<tbody class="text-center">
@foreach ($customers as $customer)
<tr>
<td>
<div class="form-check form-check-sm form-check-custom form-check-solid">
<input class="form-check-input" type="checkbox"
id="customer_checkbox_ids" name="customer_ids"
value="{{ $customer->id }}" />
</div>
</td>
<td class="text-start">{{ $loop->iteration }}</td>
<td class="text-start">{{ $customer->first_name }}</td>
<td class="text-start">{{ $customer->id }}</td>
<td class="text-start">{{ $customer->address_line1 }}</td>
<td class="text-start">{{ $customer->email_address }}</td>
<td>{{ \Carbon\Carbon::parse($customer->date_of_birth)->format('d/m/Y') }}</td>
<td class="text-start">{{ $customer->phone_number }}</td>
<td class="text-start">{{ $customer->activePassportCount }}</td>
<td class="text-start">
<a class="view-btn"
href="{{ url('/manage_customer_passport/' . $customer->id) }}">View</a>
</td>
<td>
<div class="dropout">
<button class="more">
<span></span>
<span></span>
<span></span>
</button>
<ul>
<li>
<a href="{{ url('/manage_customer_view/' . $customer->id) }}">
<img src="{{ asset('public/assets/img/view.svg') }}" />
<span>View</span>
</a>
</li>
<li>
<a class="cust_archive_btn" data-id="{{ $customer->id }}"
data-toggle="modal" data-target="#archive-modal">
<img src="{{ asset('public/assets/img/archive.svg') }}" />
<span>Archive</span>
</a>
</li>
<li>
<a href="{{ url('/manage_customer_edit/' . $customer->id) }}">
<img src="{{ asset('public/assets/img/edit.svg') }}" />
<span>Edit</span>
</a>
</li>
</ul>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</form>
</div> -->
</div>
</div>
</div>
</div>
<div class="modal fade" id="archive-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-body">
<div class="modal-header">
<button type="button pointer" class="btn-close" data-dismiss="modal" aria-label="Close">
x
</button>
</div>
<input type="hidden" id="archive_id" name="customer_id">
<p class="modal-text">Are you sure you want to<br>archive?</p>
<div class="modal-btn d-flex ">
<a class="extra-btn pointer" data-dismiss="modal">No</a>
<a class="download-btn-custom customer_archive" href="{{route('manage.customer')}}">Yes, archive</a>
</div>
</div>
</div>
</div>
@@ -246,8 +256,8 @@ $currentPage = 'manage-patient';
@section('section_script')
<script src="../src/plugins/src/table/datatable/datatables.js"></script>
<script>
<script src="{{ asset('public/assets/js/admin/manage_customer/main.js') }}"></script>
<!-- <script>
$('#zero-config').DataTable({
"dom": "<'dt--top-section'<'row'<'col-12 col-sm-6 d-flex justify-content-sm-start justify-content-center'l><'col-12 col-sm-6 d-flex justify-content-sm-end justify-content-center mt-sm-0 mt-3'f>>>" +
"<'table-responsive'tr>" +
@@ -266,10 +276,12 @@ $currentPage = 'manage-patient';
"lengthMenu": [7, 10, 20, 50],
"pageLength": 10
});
</script>
</script> -->
<script>
$(document).ready(function() {
$('<button><a class="extra-btn width-max-content" href="archive-manage-customers.php">View Archive List</a></button><button><ul class="navbar-item flex-row ms-lg-auto ms-0"><li class="nav-item dropdown action-dropdown order-lg-0 order-1"><a href="javascript:void(0);"class="nav-link dropdown-toggle user extra-btn" id="actionDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><div class="avatar-container"><div class="avatar avatar-sm avatar-indicators avatar-online"><h3>Export</h3></div></div></a><div class="dropdown-menu position-absolute" aria-labelledby="actionDropdown"><div class="dropdown-item"><a href="#"><span>Download Overview</span></a></div><div class="dropdown-item"><a href="#"><span>Download Patient Data</span></a></div><div class="dropdown-item"><a href="#"> <span>Download Selected</span></a></div></div></li></ul></button>').insertBefore("#zero-config_filter label");
$('<button><a class="extra-btn width-max-content" href="{{ route('customer_archive') }}">View Archive List</a></button><button><ul class="navbar-item flex-row ms-lg-auto ms-0"><li class="nav-item dropdown action-dropdown order-lg-0 order-1"><a href="javascript:void(0);"class="nav-link dropdown-toggle user extra-btn" id="actionDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><div class="avatar-container"><div class="avatar avatar-sm avatar-indicators avatar-online"><h3>Export</h3></div></div></a><div class="dropdown-menu position-absolute" aria-labelledby="actionDropdown"><div class="dropdown-item"><a href="#"><span>Download Overview</span></a></div><div class="dropdown-item"><a href="#"><span>Download Patient Data</span></a></div><div class="dropdown-item"><a href="#"> <span>Download Selected</span></a></div></div></li></ul></button>').insertBefore("#zero-config_filter label");
});
</script>
@endsection

View File

@@ -0,0 +1,101 @@
@extends('Admin.layouts.master')
@section('content')
@php
$currentPage = 'manage-patient';
@endphp
<style>
.error-message {
color: #FF0000;
}
form .error-message {
color: red;
}
</style>
<div class="layout-px-spacing">
<div class="middle-content container-xxl p-0">
<div class="row layout-top-spacing ">
<div class="top-tabel">
<div class="row">
<div class="col-md-4">
<!-- <h6 class="card-title">Edit Manage Customers</h6> -->
<a class="d-flex align-items-center justify-content-center pl-2"
href="{{ route('manage.customer')}}">
<img class="back-btn" src="{{ asset('public/assets/img/left-arrow.svg')}}">
<h6 class="card-title p-0">Edit Manage Customers</h6>
</a>
</div>
<div class="col-md-8">
</div>
</div>
</div>
<div class="col-xl-12 col-lg-12 col-sm-12 layout-spacing">
<div class="widget-content widget-content-area br-8 position-btn h-10">
<div class="view-details Article">
<form id="customer_user_form">
<input type="hidden" name="customer_id" class="form-control" value="{{$customers_data->id}}">
<div class="row">
<div class="col-md-6">
<div class="form-group ">
<label for="company-name" class="label">first name</label>
<input type="text" name="name" class="form-control" value="{{$customers_data->first_name}} ">
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label for="company-name" class="label">Last name</label>
<input type="text" name="last_name" class="form-control" value="{{$customers_data->last_name}}">
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label for="company-name" class="label">Location</label>
<input type="text" class="form-control" value="{{$customers_data->state ? $customers_data->state->name : 'No state assigned' }}">
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label for="company-name" class="label">User ID</label>
<input type="text" class="form-control" value="{{$customers_data->id }}">
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label for="company-name" class="label">Phone Number</label>
<input type="text" name="phone" class="form-control" value="{{$customers_data->phone_number}}">
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label for="company-name" class="label">Email ID</label>
<input type="text" name="email_id" class="form-control" value="{{$customers_data->email_address}}">
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label for="company-name" class="label">Date of Birth</label>
<input type="date" name="date_of_birth" class="form-control" value="{{$customers_data->date_of_birth}}">
</div>
</div>
<div class="col-md-6">
<button type="submit" id="customer_user_btn" class="download-btn-custom mt-3 w-25" >
<span>Save</span>
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('section_script')
<script src="{{ asset('public/assets/js/admin/manage_customer/edit.js')}}"></script>
@endsection

View File

@@ -0,0 +1,121 @@
@extends('Admin.layouts.master')
@section('content')
@php
$currentPage = 'manage-patient';
@endphp
<div class="layout-px-spacing">
<div class="middle-content container-xxl p-0">
<div class="row layout-top-spacing ">
<div class="top-tabel">
<div class="row">
<div class="col-md-4 left">
<a class="d-flex align-items-center justify-content-center pl-2" href="{{ route('manage.customer') }}">
<img class="back-btn" src="{{ asset('public/assets/img/left-arrow.svg') }}">
<h6 class="card-title p-0">View Details</h6>
</a>
</div>
<!-- <div class="col-md-8 float-right">
<a class="extra-btn" href="manage-customers.php">
<img class="back-btn" src="../src/assets/img/left-arrow.svg">
Back
</a>
</div> -->
</div>
</div>
<div class="col-xl-12 col-lg-12 col-sm-12 layout-spacing">
<div class="widget-content widget-content-area br-8 position-btn p-0">
<div class="view-details">
<div class="simple-tab">
<!-- <ul class="nav nav-tabs" id="myTab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="home-tab" data-toggle="tab"
data-target="#home-tab-pane" type="button" role="tab"
aria-controls="home-tab-pane" aria-selected="true">Personal & Medical
details</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="profile-tab" data-toggle="tab"
data-target="#profile-tab-pane" type="button" role="tab"
aria-controls="profile-tab-pane" aria-selected="false">Medical records &
schedules</button>
</li>
</ul> -->
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade show active" id="home-tab-pane" role="tabpanel" aria-labelledby="home-tab" tabindex="0">
<div class="row">
<div class="col-md-6 mb-10 tabs23">
<table>
<!-- <h4 class="tab-title">Personal information</h4> -->
<tr class="title">
<td>Name :</td>
<td>User ID :</td>
<td>Date of birth :</td>
<!-- <td class="description">Address :</td> -->
<td>Phone Number :</td>
{{-- <td>End Date :</td> --}}
</tr>
<tr class="w-100">
<td>{{ $customers_data->first_name }} {{ $customers_data->last_name }}</td>
<td>{{ $customers_data->id }}</td>
<td>{{ \Carbon\Carbon::parse($customers_data->date_of_birth)->format('d/m/Y') }}
</td>
<td>{{ $customers_data->phone_number }}</td>
{{-- <td>22/10/2023</td> --}}
</tr>
</table>
<a class="download-btn-custom mt-3" href="{{ url('/create-pdf-file', $customers_data->id) }}">
<span>Download user report</span>
<img src="{{ asset('public/assets/img/download.svg') }}" />
</a>
</div>
<div class="col-md-6 mb-10">
<table>
<!-- <h4 class="empty-title"></h4> -->
<tr class="title">
<td>Location :</td>
<td>Email ID :</td>
<td>Onboarded date :</td>
{{-- <td>Location :</td> --}}
{{-- <td>Start Date :</td> --}}
</tr>
<tr class="w-100">
<td>{{ $customers_data->state->name}}</td>
<td>{{ $customers_data->email_address }}</td>
<td>{{ \Carbon\Carbon::parse($customers_data->created_at)->format('d-m-y') }}
</td>
<td>{{ $customers_data->country_xid }}</td>
{{-- <td>03/07/2023</td> --}}
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('section_script')
<script src="{{ asset('assets/js/admin/manage_customer/main.js') }}"></script>
@endsection

View File

@@ -0,0 +1,68 @@
<!DOCTYPE html>
<html>
<head>
<title>Laravel 9 Generate PDF From View</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f4f4f4;
}
.container {
max-width: 600px;
margin: 20px auto;
background-color: #fff;
padding: 20px;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
h1 {
font-size: 24px;
margin-bottom: 30px;
text-align: center;
}
.info {
margin-bottom: 24px;
display: flex;
}
.info span {
/* font-weight: bold; */
width: 150px;
display: inline-block;
}
.info p {
margin: 0;
}
</style>
</head>
<body>
<div class="container">
<h1>Customer Information</h1>
<div class="info" style="display: flex;">
<span>First Name:</span>
<span>{{$customers_data->first_name}}</span>
</div>
<div class="info" style="display: flex;">
<span>ID:</span>
<span>{{$customers_data->id}}</span>
</div>
<div class="info" style="display: flex;">
<span>Date of Birth:</span>
<span>{{ \Carbon\Carbon::parse($customers_data->date_of_birth)->format('d-m-Y') }}</span>
</div>
<div class="info">
<span>Phone Number:</span>
<span>{{$customers_data->phone_number}}</span>
</div>
<div class="info">
<span>Email Address:</span>
<span>{{$customers_data->email_address}}</span>
</div>
<div class="info">
<span>Onboarded Date:</span>
<span>{{ \Carbon\Carbon::parse($customers_data->created_at)->format('d-m-Y') }}</span>
</div>
</div>
</body>
</html>

View File

@@ -42,6 +42,14 @@ Route::get('/profile', [ManageProfileController ::class, 'index'])->name('profil
//*******************************************************manage users********************************************************
//*******************************************************manage customer********************************************************
Route::get('/manage-customer', [ ManageCustomerController ::class, 'index'])->name('manage.customer');
Route::get('/manage_customer_passport/{id}', [ManageCustomerController::class, 'index_customer'])->name('customer_passport');
Route::get('/manage_customer_view/{id}', [ManageCustomerController::class, 'view_customer']);
Route::get('/manage_customer_edit/{id}', [ManageCustomerController::class, 'edit_customer']);
Route::post('/update_customer', [ManageCustomerController::class, 'update']);
Route::get('/manage_customer_archive', [ManageCustomerController::class, 'archive_customer'])->name('customer_archive');
Route::delete('/manage_customer_archive/{id}', [ManageCustomerController::class, 'delete_customer']);
Route::get('/create-pdf-file/{id}', [ManageCustomerController::class, 'download_pdf']);
Route::post('/export_selected_customer', [ManageCustomerController::class, 'exportSelectedCustomer'])->name('export-selected-customer');
//*******************************************************manage restraunts********************************************************
Route::get('/manage-restaurants', [ManageRestrauntController ::class, 'index'])->name('manage.restaurants');