first change

This commit is contained in:
2025-07-27 17:40:56 +05:45
commit f8b9a6725b
3152 changed files with 229528 additions and 0 deletions

View File

View File

@@ -0,0 +1,7 @@
@extends('product::layouts.master')
@section('content')
<h1>Hello World</h1>
<p>Module: {!! config('product.name') !!}</p>
@endsection

View File

@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Product Module - {{ config('app.name', 'Laravel') }}</title>
<meta name="description" content="{{ $description ?? '' }}">
<meta name="keywords" content="{{ $keywords ?? '' }}">
<meta name="author" content="{{ $author ?? '' }}">
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.bunny.net">
<link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />
{{-- Vite CSS --}}
{{-- {{ module_vite('build-product', 'resources/assets/sass/app.scss') }} --}}
</head>
<body>
@yield('content')
{{-- Vite JS --}}
{{-- {{ module_vite('build-product', 'resources/assets/js/app.js') }} --}}
</body>

View File

@@ -0,0 +1,16 @@
@extends('layouts.app')
@section('content')
<div class="container-fluid">
<x-dashboard.breadcumb :title="$title" />
{{ html()->form('POST')->route('product.store')->class(['needs-validation'])->attributes(['novalidate'])->open() }}
@include('product::products.partials.action')
{{ html()->form()->close() }}
</div>
@endsection

View File

@@ -0,0 +1,18 @@
<div class="hstack flex-wrap gap-3">
@can('product.show')
<a href="javascript:void(0)" data-link="{{ route('product.show', $id) }}" class="link-secondary fs-15 view-item-btn"><i
class="ri-eye-fill"></i>
</a>
@endcan
@can('product.edit')
<a href="{{ route('product.edit', $id) }}" class="link-primary fs-15 edit-item-btn"><i class="ri-edit-2-fill"></i>
</a>
@endcan
@can('product.destroy')
<a href="javascript:void(0);" data-link="{{ route('product.destroy', $id) }}" data-id="{{ $id }}"
class="link-danger fs-15 remove-item-btn"><i class="ri-delete-bin-fill"></i></a>
@endcan
</div>

View File

@@ -0,0 +1,14 @@
@extends('layouts.app')
@section('content')
<div class="container-fluid">
<x-dashboard.breadcumb :title="$title" />
{{ html()->modelForm($product, 'PUT')->route('product.update', $product->id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
@include('product::products.partials.action')
{{ html()->form()->close() }}
</div>
@endsection

View File

@@ -0,0 +1,42 @@
@if(isset($product) && $product->id)
{{ html()->modelForm($product, 'PUT')->route('product.update', $product->id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
@else
{{ html()->form('POST')->route('product.store')->class(['needs-validation'])->attributes(['novalidate'])->open() }}
@endif
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-body">
<div class="row gy-3">
<div class="col-md-12">
{{ html()->label('Name')->class('form-label') }}
{{ html()->text('name')->class('form-control')->value($product->name ?? null)->placeholder('Product Name')->required() }}
{{ html()->div('Please enter product name')->class('invalid-feedback') }}
</div>
<div class="col-md-12">
{{ html()->label('Client')->class('form-label') }}
{{ html()->select('client_id', $clients)->class('form-select select2')->value(!empty($product) ? $product?->client?->id : null)->placeholder('Select Client')->required() }}
{{ html()->div('Please select client')->class('invalid-feedback') }}
</div>
<div class="col-md-12">
{{ html()->label('Status')->class('form-label') }}
{{ html()->select('status', $status)->value($product->status ?? null)->class('form-select') }}
</div>
<div class="col-md-12">
{{ html()->label('Description')->class('form-label') }}
{{ html()->textarea('description')->value($product->description ?? null)->class('form-control') }}
</div>
<x-form-buttons :editable="false" :label="isset($product) ? 'Update' : 'Save'" href="{{ route('product.index') }}" />
</div>
</div>
</div>
<!-- end card -->
</div>
</div>
{{ html()->form()->close() }}

View File

@@ -0,0 +1,72 @@
@extends('layouts.app')
@section('content')
<div class="container-fluid">
<x-dashboard.breadcumb :title="$title" />
<div class="row">
<div class="col-lg-4 col-xl-3">
@include('product::products.form')
</div>
<div class="col-lg-8 col-xl-9">
<div class="card">
<div class="card-body">
@php
$columns = [
[
'title' => 'SN',
'data' => 'DT_RowIndex',
'name' => 'DT_RowIndex',
'orderable' => false,
'searchable' => false,
],
['title' => 'Client', 'data' => 'client', 'name' => 'client'],
['title' => 'Name', 'data' => 'name', 'name' => 'name'],
['title' => 'Status', 'data' => 'status', 'name' => 'status'],
[
'title' => 'Action',
'data' => 'action',
'orderable' => false,
'searchable' => false,
],
];
@endphp
<x-data-table-script :route="route('product.index')" :columns="$columns" />
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="viewModal" tabindex="-1" aria-labelledby="showgridLabel" aria-modal="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="showgridLabel">Product Detail</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
</div>
</div>
</div>
</div>
@endsection
@push('js')
<script>
$(document).on("click", '.view-item-btn', function(e) {
e.preventDefault();
const url = $(this).attr('data-link');
$.get(url, function(res) {
$('#viewModal').modal('show');
$('#viewModal .modal-body').html(res);
})
})
</script>
@endpush

View File

@@ -0,0 +1,31 @@
<div class="row">
<div class="col-md-12">
<div class="card-body p-2">
<div class="table-responsive">
<table class="table-borderless mb-0 table table-sm">
<tbody>
<tr>
<th><span class="fw-medium">Client Name:</span></th>
<td>{{ $product->client?->name }}</td>
</tr>
<tr>
<th><span class="fw-medium">Product Name:</span></th>
<td>{{ $product->name }}</td>
</tr>
<tr>
<th><span class="fw-medium">Description:</span></th>
<td>{!! $product->description !!}</td>
</tr>
<tr>
<th><span class="fw-medium">Status:</span></th>
<td>{!! $product->status_name !!}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="text-end">
<button type="button" class="btn btn-info" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>