⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.91
Server IP:
157.245.101.34
Server:
Linux skvinfotech-website 5.4.0-131-generic #147-Ubuntu SMP Fri Oct 14 17:07:22 UTC 2022 x86_64
Server Software:
Apache/2.4.41 (Ubuntu)
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
html
/
resources
/
views
/
backend
/
orders
/
View File Name :
order_details.blade.php
@extends('backend.layouts.backend') @section('css_before') <!-- Page JS Plugins CSS --> <link rel="stylesheet" href="{{ asset('js/plugins/datatables/dataTables.bootstrap4.css') }}"> <link rel="stylesheet" href="{{ asset('js/plugins/datatables/buttons-bs4/buttons.bootstrap4.min.css') }}"> @endsection @section('js_after') <!-- Page JS Plugins --> <script src="{{ asset('js/plugins/datatables/jquery.dataTables.min.js') }}"></script> <script src="{{ asset('js/plugins/datatables/dataTables.bootstrap4.min.js') }}"></script> <script src="{{ asset('js/plugins/datatables/buttons/dataTables.buttons.min.js') }}"></script> <script src="{{ asset('js/plugins/datatables/buttons/buttons.print.min.js') }}"></script> <script src="{{ asset('js/plugins/datatables/buttons/buttons.html5.min.js') }}"></script> <script src="{{ asset('js/plugins/datatables/buttons/buttons.flash.min.js') }}"></script> <script src="{{ asset('js/plugins/datatables/buttons/buttons.colVis.min.js') }}"></script> <!-- Page JS Code --> <script src="{{ asset('js/pages/tables_datatables.js') }}"></script> @endsection @section('content') <!-- Hero --> <div class="content"> <div class="block"> <div class="block-header block-header-default"> <h3 class="block-title"> <i class="fa fa-layer-group"></i> Order Details </h3> </div> <div class="block-content"> <table class="table sub-pack"> <tr> <th><b>ORDER BY</b></th> <td style="width: 3%;">:</td> <td>{{$order->user->name}}</td> </tr> <tr> <th><b>ORDER ID</b></th> <td style="width: 3%;">:</td> <td>{{strtoupper($order->ordername_id)}}</td> </tr> <tr> <th><b>ORDER TYPE</b></th> <td style="width: 3%;">:</td> <td>{{$order->order_type}}</td> </tr> <tr> <th><b>Total Weight</b></th> <td style="width: 3%;">:</td> <td>{{$order->total_weight}}</td> </tr> <!-- <tr> <th><b>Edit Weight</b></th> <td style="width: 3%;">:</td> <td> <button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#changeweightModal"> Update Weight </button> </td> </tr> --> <tr> <th><b>Total Quantity</b></th> <td style="width: 3%;">:</td> <td>{{$order->total_quantity}}</td> </tr> <tr> <th><b>Estimated Price</b></th> <td style="width: 3%;">:</td> <td>{{$order->price}}</td> </tr> <!-- <tr> <th><b>Change Price</b></th> <td style="width: 3%;">:</td> <td> <button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#changepriceModal"> Change Price </button> </td> </tr> --> <!-- <tr> <th><b>Generate Invoice</b></th> <td style="width: 3%;">:</td> <td> <a href="{{ route('orders.invoice',[$order->id]) }}" target="_blank"> <button type="button" class="btn btn-primary btn-sm" data-toggle="click-ripple"> <i class="far fa-edit"></i> </button> </a> </td> </tr> --> <tr> <th><b>Request Status</b></th> <td style="width: 3%;">:</td> @if($order->request_status==2) <td><a href="{{ route('orders.successorder',[$order->id]) }}" class="btn btn-warning btn-sm">Change to Dispose</a></td> @elseif($order->request_status==1) <td><a href="{{ route('orders.successorder',[$order->id]) }}" class="btn btn-success btn-sm">Change to Success</a></td> @elseif($order->request_status==3) <td>{{'REJECTED'}}</td> @elseif($order->request_status == 4) <td>{{'DISPOSED'}}</td> @endif </tr> <tr> <th><b>Request Date</b></th> <td style="width: 3%;">:</td> <td>{{date('d-m-Y',strtotime($order->created_at))}}</td> </tr> <tr> <th><b>Address</b></th> <td style="width: 3%;">:</td> <td>{{ json_decode($order->user_address_detail) }}</td> </tr> @if($order->accepted_date) <tr> <th><b>Accepted Date</b></th> <td style="width: 3%;">:</td> <td>{{date('d-m-Y',strtotime($order->accepted_date))}}</td> </tr> @endif </table> </div> {{-- start of change price model --}} <div class="modal fade" id="changepriceModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLabel">Edit Price</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <form class="mb-5 js-validation" action="{{route('orders.editprice',[$order->id])}}" method="post" enctype="multipart/form-data"> @csrf <div class="row"> <div class="form-group col-6"> <label>Price</label> <input type="text" class="form-control" id="name" name="price" value="{{$order->price}}" placeholder="Enter amount here"> </div> <div class="w-100"></div> <div class="form-group col-8"> <button type="submit" class="btn btn-success">Submit</button> <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> </div> </div> </form> </div> </div> </div> </div> {{-- end of change price model --}} {{-- start of change weight model --}} <div class="modal fade" id="changeweightModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLabel">Update Weight</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <form class="mb-5 js-validation" action="{{route('orders.editweight',[$order->id])}}" method="post" enctype="multipart/form-data"> @csrf <div class="row"> <div class="form-group col-6"> <label>Total Weight</label> <input type="number" class="form-control" id="total_weight" name="total_weight" value="{{$order->total_weight}}" placeholder="Enter weight here"> </div> <div class="w-100"></div> <div class="form-group col-8"> <button type="submit" class="btn btn-success">Submit</button> <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> </div> </div> </form> </div> </div> </div> </div> {{-- end of change weight model --}} </div> <div class="block"> <div class="block block-rounded"> <div class="p-3"> <div class="row"> <div class="col-sm-12 col-md-12 text-right"> <div class="block-header add-btn"> <button type="button" class="btn btn-primary btn-sm pull-right" data-toggle="modal" data-target="#addOrderProduct"> <i class="fa fa-plus"></i> </button> </div> </div> </div> </div> <div class="block-content block-content-full"> <!-- DataTables init on table by adding .js-dataTable-full class, functionality is initialized in js/pages/be_tables_datatables.min.js which was auto compiled from _js/pages/be_tables_datatables.js --> <table class="table table-bordered table-striped table-vcenter js-dataTable-full"> <thead> <tr> <th class="text-center" style="width: 80px;">S.NO</th> <th>Product Name</th> <th>Quantity</th> <th style="width: 15%;">Action</th> </tr> </thead> <tbody> @php ($i = 1) @foreach($order->orderedProducts as $order_product) <tr> <td>{{ $i }}</td> <td>{{ $order_product->product ? $order_product->product->product_name : "null"}}</td> <td>{{ $order_product->quantity}}</td> <td> <button type="button" class="btn btn-primary btn-sm pull-right" data-toggle="modal" data-target="#editOrderProduct{{$order_product->id}}"> <i class="far fa-edit"></i> </button> <a href="{{ url('/delete_orderproduct',[$order_product->id]) }}" class="delete-click"> <button type="button" class="btn btn-danger btn-sm" data-toggle="click-ripple"><i class="far fa-trash-alt"></i> </button> </a> </td> </tr> <div class="modal fade" id="editOrderProduct{{$order_product->id}}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLabel">Edit Product</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <form class="mb-5 js-validation" action="{{route('orders.editProduct',[$order_product->id])}}" method="post" enctype="multipart/form-data"> @csrf <div class="row"> <div class="form-group col-6"> <label>Product</label> <select name="product_id" class="form-control" id="product_id" > <option value="">{{"Select"}}</option> @foreach($products as $product) <option value="{{$product->id}}" {{($order_product->product_id==$product->id) ? "selected ":""}}>{{$product->product_name}} </option> @endforeach </select> </div> <div class="w-100"></div> <div class="form-group col-6"> <label>Quantity</label> <input type="number" class="form-control" id="quantity" name="quantity" value="{{$order_product->quantity}}" placeholder="Enter Quantity here"> <input type="hidden" name="order_id" value="{{$order->id}}"> </div> <div class="w-100"></div> <div class="form-group col-6"> <label>Weight</label> <input type="number" class="form-control" id="weight" name="weight" value="{{$order_product->weight}}" placeholder="Enter Weight here" required> <input type="hidden" name="order_id" value="{{$order->id}}"> </div> <div class="w-100"></div> <div class="form-group col-6"> <label>Price</label> <input type="number" class="form-control" id="price" name="price" value="{{$order_product->price}}" placeholder="Enter Price here" required> <input type="hidden" name="order_id" value="{{$order->id}}"> </div> <div class="w-100"></div> <div class="form-group col-6"> <label>HSN/SAC</label> <input type="text" class="form-control" id="hsn_sac" name="hsn_sac" value="{{$order_product->product->hsn_sac}}"> </div> <div class="w-100"></div> <div class="form-group col-8"> <button type="submit" class="btn btn-success">Submit</button> <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> </div> </div> </form> </div> </div> </div> </div> @php ($i++) @endforeach </tbody> </table> {{-- start of add product model --}} <div class="modal fade" id="addOrderProduct" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLabel">Add Product</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <form class="mb-5 js-validation" action="{{route('orders.addProduct')}}" method="post" enctype="multipart/form-data"> @csrf <div class="row"> <div class="form-group col-6"> <label>Product</label> <select name="product_id" class="form-control" id="product_id"> <option value="">{{"Select"}}</option> @foreach($products as $product) <option value="{{$product->id}}">{{$product->product_name}}</option> @endforeach </select> </div> <div class="w-100"></div> <div class="form-group col-6"> <label>Quantity</label> <input type="text" class="form-control" id="quantity" name="quantity" placeholder="Enter Quantity here"> <input type="hidden" name="order_id" value="{{$order->id}}"> </div> <div class="w-100"></div> <div class="form-group col-6"> <label>Weight</label> <input type="number" class="form-control" id="weight" name="weight" placeholder="Enter Weight here" required> <input type="hidden" name="order_id" value="{{$order->id}}"> </div> <div class="w-100"></div> <div class="form-group col-6"> <label>Price</label> <input type="number" class="form-control" id="price" name="price" placeholder="Enter Price here" required> <input type="hidden" name="order_id" value="{{$order->id}}"> </div> <div class="w-100"></div> <div class="form-group col-8"> <button type="submit" class="btn btn-success">Submit</button> <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> </div> </div> </form> </div> </div> </div> </div> {{-- end of add product model --}} </div> </div> </div> </div> @endsection @push('script') <script> function submitForm(btn) { // disable the button btn.disabled = true; // submit the form btn.form.submit(); } </script> @endpush