This commit is contained in:
jilhanhaura 2023-08-15 13:44:28 +07:00
parent 7cc5781564
commit 05bcc41781
25 changed files with 845 additions and 204 deletions

View File

@ -0,0 +1,66 @@
<?php
namespace App\Http\Controllers;
use App\Models\Refund;
use App\Http\Requests\StoreRefundRequest;
use App\Http\Requests\UpdateRefundRequest;
class RefundController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
//
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*/
public function store(StoreRefundRequest $request)
{
//
}
/**
* Display the specified resource.
*/
public function show(Refund $refund)
{
//
}
/**
* Show the form for editing the specified resource.
*/
public function edit(Refund $refund)
{
//
}
/**
* Update the specified resource in storage.
*/
public function update(UpdateRefundRequest $request, Refund $refund)
{
//
}
/**
* Remove the specified resource from storage.
*/
public function destroy(Refund $refund)
{
//
}
}

View File

@ -0,0 +1,66 @@
<?php
namespace App\Http\Controllers;
use App\Models\transaction;
use App\Http\Requests\StoretransactionRequest;
use App\Http\Requests\UpdatetransactionRequest;
class TransactionController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
//
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*/
public function store(StoretransactionRequest $request)
{
//
}
/**
* Display the specified resource.
*/
public function show(transaction $transaction)
{
//
}
/**
* Show the form for editing the specified resource.
*/
public function edit(transaction $transaction)
{
//
}
/**
* Update the specified resource in storage.
*/
public function update(UpdatetransactionRequest $request, transaction $transaction)
{
//
}
/**
* Remove the specified resource from storage.
*/
public function destroy(transaction $transaction)
{
//
}
}

View File

@ -0,0 +1,28 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class StoreRefundRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return false;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array|string>
*/
public function rules(): array
{
return [
//
];
}
}

View File

@ -0,0 +1,28 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class StoretransactionRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return false;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array|string>
*/
public function rules(): array
{
return [
//
];
}
}

View File

@ -0,0 +1,28 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class UpdateRefundRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return false;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array|string>
*/
public function rules(): array
{
return [
//
];
}
}

View File

@ -0,0 +1,28 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class UpdatetransactionRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return false;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array|string>
*/
public function rules(): array
{
return [
//
];
}
}

71
app/Models/Refund.php Normal file
View File

@ -0,0 +1,71 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Refund
{
private static $history_refund=[
[
"orderId" => "INV-1234",
"customer" => "Okta",
"seller" => "dodo",
"total" => "Rp. 15000",
"date" => "July 19, 2023 ",
"status"=>"Process Refund"
],
[
"orderId" => "INV-0000",
"customer" => "Selvi",
"seller" => "dedo",
"total" => "Rp. 11000",
"date" => "August 19, 2023 ",
"status"=>"Process Refund"
],
[
"orderId" => "INV-2313",
"customer" => "Septa",
"seller" => "dido",
"total" => "Rp. 15000",
"date" => "July 29, 2023 ",
"status"=>"Process Refund"
],
[
"orderId" => "INV-5664",
"customer" => "Padia",
"seller" => "dedo",
"total" => "Rp. 14000",
"date" => "July 18, 2023 ",
"status"=>"Process Refund"
],
[
"orderId" => "INV-9090",
"customer" => "hantu",
"seller" => "dado",
"total" => "Rp. 45000",
"date" => "June 19, 2023 ",
"status"=>"Process Refund"
]
];
public static $detail_refund=[
[
"orderId" => "INV-9090",
"customer" => "hantu",
"seller" => "dado",
"total" => "Rp. 45000",
"date" => "June 19, 2023 ",
"complaint" =>" Lorem ipsum dolor sit, amet consectetur adipisicing elit. Aliquam inventore, sit enim iure itaque fuga voluptates alias, eveniet quos ex reiciendis! Dolore mollitia ea inventore, excepturi hic fugiat id, magnam molestias sint ut enim repellendus, cum dolorum dolores sapiente adipisci tempora nihil omnis! Accusantium, non perspiciatis? Molestias modi debitis perferendis reprehenderit excepturi voluptates? Sit incidunt consequuntur iusto odit sapiente inventore nemo commodi, quam vero magnam temporibus ducimus praesentium assumenda blanditiis possimus perferendis totam placeat maiores. Quae ut id libero atque pariatur veritatis rerum culpa tempore consequatur quod corrupti corporis nobis quia repellendus iste quidem illum, voluptates aspernatur cumque officia. Tenetur.",
"image"=>"assets/images/dashboard/img_2.jpg"
]
];
public static function HistoryRefund(){
return self::$history_refund;
}
public static function DetailRefund(){
return self::$detail_refund;
}
}

View File

@ -0,0 +1,77 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class transaction
{
private static $list_transaction =[
[
"orderId" => "INV-1234",
"customer" => "Jilhan",
"seller" => "dodo",
"total" => "Rp. 15000",
"date" => "July 19, 2023 ",
"status"=>"paid"
],
[
"orderId" => "INV-0000",
"customer" => "hmmm",
"seller" => "dodo",
"total" => "Rp. 11000",
"date" => "August 19, 2023 ",
"status"=>"pending"
],
[
"orderId" => "INV-2313",
"customer" => "nurul",
"seller" => "dido",
"total" => "Rp. 15000",
"date" => "July 29, 2023 ",
"status"=>"unpaid"
],
[
"orderId" => "INV-5664",
"customer" => "raihan",
"seller" => "dedo",
"total" => "Rp. 14000",
"date" => "July 18, 2023 ",
"status"=>"pending"
],
[
"orderId" => "INV-9090",
"customer" => "testing",
"seller" => "dado",
"total" => "Rp. 45000",
"date" => "June 19, 2023 ",
"status"=>"paid"
]
];
private static $detail_transaction=[
[
"tracking_number" => "09102919209",
"orderId" => "INV-9090",
"status"=>"Pending",
"estimated" => "June 20, 2023",
"tracking_detail1"=> "August 10: processed payment",
"tracking_detail2"=> "August 12: payment in system",
"tracking_detail3"=> "August 14: payment has been received by the seller",
],
];
public static function allTransactions()
{
return self::$list_transaction;
}
public static function allDetailTransactions()
{
return self::$detail_transaction;
}
}

View File

@ -0,0 +1,66 @@
<?php
namespace App\Policies;
use App\Models\Refund;
use App\Models\User;
use Illuminate\Auth\Access\Response;
class RefundPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
//
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, Refund $refund): bool
{
//
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
//
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, Refund $refund): bool
{
//
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, Refund $refund): bool
{
//
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, Refund $refund): bool
{
//
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, Refund $refund): bool
{
//
}
}

View File

@ -0,0 +1,66 @@
<?php
namespace App\Policies;
use App\Models\User;
use App\Models\transaction;
use Illuminate\Auth\Access\Response;
class TransactionPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
//
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, transaction $transaction): bool
{
//
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
//
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, transaction $transaction): bool
{
//
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, transaction $transaction): bool
{
//
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, transaction $transaction): bool
{
//
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, transaction $transaction): bool
{
//
}
}

View File

@ -0,0 +1,23 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Refund>
*/
class RefundFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
//
];
}
}

View File

@ -0,0 +1,23 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\transaction>
*/
class TransactionFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
//
];
}
}

View File

@ -0,0 +1,27 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('transactions', function (Blueprint $table) {
$table->id();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('transactions');
}
};

View File

@ -0,0 +1,27 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('refunds', function (Blueprint $table) {
$table->id();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('refunds');
}
};

View File

@ -0,0 +1,17 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class RefundSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
//
}
}

View File

@ -0,0 +1,17 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class TransactionSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
//
}
}

View File

@ -107,7 +107,7 @@
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h4>History Transaction</h4>
<h2>History Transaction</h2>
</div>
<div class="card-body p-0">
<div class="table-responsive table-invoice">
@ -121,61 +121,22 @@
<th>Status</th>
<th>Action</th>
</tr>
<tr>
<td><a href="/Detail_History">INV-87239</a></td>
<td class="font-weight-600">Kusnadi</td>
<td class="font-weight-600">didi</td>
<td class="font-weight-600">Rp. 150000</td>
<td>July 19, 2018</td>
<td>
<div class="badge badge-danger">Unpaid</div>
</td>
<td>
<a href="/Detail_History" class="btn btn-primary">Detail</a>
</td>
</tr>
<tr>
<td><a href="/Detail_History">INV-48574</a></td>
<td class="font-weight-600">Hasan Basri</td>
<td class="font-weight-600">dodo</td>
<td class="font-weight-600">Rp. 150000</td>
<td>July 21, 2018</td>
<td>
<div class="badge badge-success">Paid</div>
</td>
@foreach ($transaction as $transactions)
<tr>
<td><a href="#">{{ $transactions['orderId'] }}</a></td>
<td class="font-weight-600">{{ $transactions['customer'] }}</td>
<td class="font-weight-600">{{ $transactions['seller'] }}</td>
<td class="font-weight-600">{{ $transactions['total'] }}</td>
<td>{{ $transactions['date'] }}</td>
<td>
<div class="badge badge-success">{{ $transactions['status'] }}</div>
</td>
<td>
<a href="/Detail_History" class="btn btn-primary">Detail</a>
</td>
<td>
<a href="/Detail_History" class="btn btn-primary">Detail</a>
</td>
</tr>
<tr>
<td><a href="/Detail_History">INV-48574</a></td>
<td class="font-weight-600">Hasan Basri</td>
<td class="font-weight-600">dodo</td>
<td class="font-weight-600">Rp. 150000</td>
<td>July 21, 2018</td>
<td>
<div class="badge badge-success">Paid</div>
</td>
<td>
<a href="/Detail_History" class="btn btn-primary">Detail</a>
</td>
</tr>
<tr>
<td><a href="/Detail_History">INV-48574</a></td>
<td class="font-weight-600">Hasan Basri</td>
<td class="font-weight-600">dodo</td>
<td class="font-weight-600">Rp. 150000</td>
<td>July 21, 2018</td>
<td>
<div class="badge badge-success">Paid</div>
</td>
<td>
<a href="#" class="btn btn-primary">Detail</a>
</td>
</tr>
</tr>
@endforeach
</table>
</div>

View File

@ -203,7 +203,7 @@
<li class="dropdown"><a href="#" data-toggle="dropdown"
class="nav-link dropdown-toggle nav-link-lg nav-link-user">
<img alt="image" src="assets/img/avatar/avatar-1.png" class="rounded-circle mr-1">
<div class="d-sm-none d-lg-inline-block">Hi, Jilhan Haura</div>
<div class="d-sm-none d-lg-inline-block">Hi, {{ $name }}</div>
</a>
<div class="dropdown-menu dropdown-menu-right">
<div class="dropdown-title">Logged in 5 min ago</div>

View File

@ -22,7 +22,8 @@
</ul>
</li>
<li><a class="nav-link" href="blank.html"><i class="far fa-square"></i> <span>List Refund</span></a></li>
<li><a class="nav-link" href="/history_refund"><i class="far fa-square"></i> <span>List Refund</span></a>
</li>
</ul>
{{-- <div class="mt-4 mb-4 p-3 hide-sidebar-mini">

View File

@ -0,0 +1,36 @@
@extends('layout.main')
@section('content')
<div class="main-content">
<section class="section">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h2>Detail Refund</h2>
</div>
@foreach ($detail_refund as $DetailRefund)
<div class="card-body p-0">
<div class="container">
<p><strong>ID Order:</strong> {{ $DetailRefund['orderId'] }}</p>
<p><strong>Customer Name:</strong> {{ $DetailRefund['customer'] }}</p>
<p><strong>Seller Name:</strong> {{ $DetailRefund['seller'] }}</p>
<p><strong>Total:</strong> {{ $DetailRefund['total'] }}</p>
<p><strong>Due Date:</strong> {{ $DetailRefund['date'] }}</p>
<p><strong>Reason Complaint:</strong> {{ $DetailRefund['complaint'] }}</p>
<p><strong>Image/Video: </strong></p>
<img src="assets/images/dashboard/img_2.jpg" alt="Return Image" width="300"><br><br>
<div class="d-flex justify-content-center">
<a href="?showRefund=true" class="btn btn-primary mx-1">Accept</a>
<a href="/history_refund" class="btn btn-danger mx-1">Decline</a>
</div>
</div><br>
</div>
@endforeach
</div>
</div>
</section>
</div>
@endsection

View File

@ -0,0 +1,43 @@
@extends('layout.main')
@section('content')
<div class="main-content">
<section class="section">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h2>History Refund</h2>
</div>
<div class="card-body p-0">
<div class="table-responsive table-invoice">
<table class="table table-striped">
<tr>
<th>Order ID</th>
<th>Customer</th>
<th>Seller</th>
<th>Total</th>
<th>Due Date</th>
<th>Status</th>
<th>Action</th>
</tr>
@foreach ($history_refund as $HistoryRefund)
<tr>
<td class="font-weight-600">{{ $HistoryRefund['orderId'] }}</a></td>
<td class="font-weight-600">{{ $HistoryRefund['customer'] }}</td>
<td class="font-weight-600">{{ $HistoryRefund['seller'] }}</td>
<td class="font-weight-600">{{ $HistoryRefund['total'] }}</td>
<td>{{ $HistoryRefund['date'] }}</td>
<td>
<div class="badge badge-danger">{{ $HistoryRefund['status'] }}</div>
</td>
<td>
<a href="/detail_refund" class="btn btn-primary">Detail</a>
</td>
</tr>
@endforeach
</table>
</div>
</div>
</div>
</div>
@endsection

View File

@ -1,21 +1,25 @@
@extends('layout.main')
@section('content')
<div class="main-content">
<section class="section">
<div class="tracking-container">
<h1>Tracking Information</h1>
<div class="tracking-info">
<p>Tracking Number: <span class="tracking-status">123456789</span></p>
<p>Status: <span class="tracking-status">Pending</span></p>
<p>Estimated : August 20, 2023</p>
@foreach ($detail_transaction as $detail_transactions)
<div class="main-content">
<section class="section">
<div class="tracking-container">
<h2>Tracking Information</h2>
<div class="tracking-info">
<p>Tracking Number: <span
class="tracking-status">{{ $detail_transactions['tracking_number'] }}</span></p>
<p>Order ID: <span class="tracking-status">{{ $detail_transactions['orderId'] }}</span></p>
<p>Status: <span class="tracking-status">{{ $detail_transactions['status'] }}</span></p>
<p>Estimated: {{ $detail_transactions['estimated'] }}</p>
</div>
<h2>Tracking Details</h2>
<ul>
<li>{{ $detail_transactions['tracking_detail1'] }}</li>
<li>{{ $detail_transactions['tracking_detail2'] }}</li>
<li>{{ $detail_transactions['tracking_detail3'] }}</li>
</ul>
</div>
<h2>Tracking Details</h2>
<ul>
<li>August 10: processed payment</li>
<li>August 12: payment in system</li>
<li>August 14: payment has been received by the seller</li>
</ul>
</div>
</section>
</div>
</section>
</div>
@endforeach
@endsection

View File

@ -5,7 +5,7 @@
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h4>History Transaction</h4>
<h2>History Transaction</h2>
</div>
<div class="card-body p-0">
<div class="table-responsive table-invoice">
@ -19,61 +19,22 @@
<th>Status</th>
<th>Action</th>
</tr>
<tr>
<td><a href="/Detail_History">INV-87239</a></td>
<td class="font-weight-600">Kusnadi</td>
<td class="font-weight-600">didi</td>
<td class="font-weight-600">Rp. 150000</td>
<td>July 19, 2018</td>
<td>
<div class="badge badge-danger">Unpaid</div>
</td>
<td>
<a href="/Detail_History" class="btn btn-primary">Detail</a>
</td>
</tr>
<tr>
<td><a href="/Detail_History">INV-48574</a></td>
<td class="font-weight-600">Hasan Basri</td>
<td class="font-weight-600">dodo</td>
<td class="font-weight-600">Rp. 150000</td>
<td>July 21, 2018</td>
<td>
<div class="badge badge-success">Paid</div>
</td>
@foreach ($transaction as $transactions)
<tr>
<td><a href="#">{{ $transactions['orderId'] }}</a></td>
<td class="font-weight-600">{{ $transactions['customer'] }}</td>
<td class="font-weight-600">{{ $transactions['seller'] }}</td>
<td class="font-weight-600">{{ $transactions['total'] }}</td>
<td>{{ $transactions['date'] }}</td>
<td>
<div class="badge badge-success">{{ $transactions['status'] }}</div>
</td>
<td>
<a href="/Detail_History" class="btn btn-primary">Detail</a>
</td>
<td>
<a href="/Detail_History" class="btn btn-primary">Detail</a>
</td>
</tr>
<tr>
<td><a href="/Detail_History">INV-48574</a></td>
<td class="font-weight-600">Hasan Basri</td>
<td class="font-weight-600">dodo</td>
<td class="font-weight-600">Rp. 150000</td>
<td>July 21, 2018</td>
<td>
<div class="badge badge-success">Paid</div>
</td>
<td>
<a href="/Detail_History" class="btn btn-primary">Detail</a>
</td>
</tr>
<tr>
<td><a href="/Detail_History">INV-48574</a></td>
<td class="font-weight-600">Hasan Basri</td>
<td class="font-weight-600">dodo</td>
<td class="font-weight-600">Rp. 150000</td>
<td>July 21, 2018</td>
<td>
<div class="badge badge-success">Paid</div>
</td>
<td>
<a href="/Detail_History" class="btn btn-primary">Detail</a>
</td>
</tr>
</tr>
@endforeach
</table>
</div>

View File

@ -5,7 +5,7 @@
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h4>List Transaction</h4>
<h2>List Transaction</h2>
</div>
<div class="card-body p-0">
<div class="table-responsive table-invoice">
@ -20,77 +20,25 @@
<th class="text-center">Action</th>
</tr>
<tr>
<td><a href="#">INV-87239</a></td>
<td class="font-weight-600">Kusnadi</td>
<td class="font-weight-600">didi</td>
<td class="font-weight-600">Rp. 150000</td>
<td>July 19, 2018</td>
<td>
<div class="badge badge-danger">Unpaid</div>
</td>
<td>
<div class="d-flex justify-content-center">
<a href="#" class="btn btn-primary mx-1">Edit</a>
<a href="#" class="btn btn-danger mx-1">Delete</a>
</div>
</td>
@foreach ($transaction as $transactions)
<tr>
<td><a href="#">{{ $transactions['orderId'] }}</a></td>
<td class="font-weight-600">{{ $transactions['customer'] }}</td>
<td class="font-weight-600">{{ $transactions['seller'] }}</td>
<td class="font-weight-600">{{ $transactions['total'] }}</td>
<td>{{ $transactions['date'] }}</td>
<td>
<div class="badge badge-success">{{ $transactions['status'] }}</div>
</td>
<td>
<div class="d-flex justify-content-center">
<a href="#" class="btn btn-primary mx-1">Edit</a>
<a href="#" class="btn btn-danger mx-1">Delete</a>
</div>
</td>
</tr>
<tr>
<td><a href="#">INV-48574</a></td>
<td class="font-weight-600">Hasan Basri</td>
<td class="font-weight-600">dodo</td>
<td class="font-weight-600">Rp. 150000</td>
<td>July 21, 2018</td>
<td>
<div class="badge badge-success">Paid</div>
</td>
<td>
<div class="d-flex justify-content-center">
<a href="#" class="btn btn-primary mx-1">Edit</a>
<a href="#" class="btn btn-danger mx-1">Delete</a>
</div>
</td>
</tr>
<tr>
<td><a href="#">INV-48574</a></td>
<td class="font-weight-600">Hasan Basri</td>
<td class="font-weight-600">dodo</td>
<td class="font-weight-600">Rp. 150000</td>
<td>July 21, 2018</td>
<td>
<div class="badge badge-success">Paid</div>
</td>
<td>
<div class="d-flex justify-content-center">
<a href="#" class="btn btn-primary mx-1">Edit</a>
<a href="#" class="btn btn-danger mx-1">Delete</a>
</div>
</td>
</tr>
<tr>
<td><a href="#">INV-48574</a></td>
<td class="font-weight-600">Hasan Basri</td>
<td class="font-weight-600">dodo</td>
<td class="font-weight-600">Rp. 150000</td>
<td>July 21, 2018</td>
<td>
<div class="badge badge-success">Paid</div>
</td>
<td>
<div class="d-flex justify-content-center">
<a href="#" class="btn btn-primary mx-1">Edit</a>
<a href="#" class="btn btn-danger mx-1">Delete</a>
</div>
</td>
</tr>
</tr>
@endforeach
</table>
</div>

View File

@ -1,5 +1,7 @@
<?php
use App\Models\Refund;
use App\Models\transaction;
use Illuminate\Support\Facades\Route;
/*
@ -14,13 +16,40 @@ use Illuminate\Support\Facades\Route;
*/
Route::get('/', function () {
return view('index');
return view('index',[
'name'=>'Jilhan Haura',
"transaction"=>transaction::allTransactions()
]);
});
Route::get('/list_transaction', function () {
return view('transaction/List_Transaction');
return view('transaction/List_Transaction',[
'name'=>'Jilhan Haura',
"transaction"=> transaction::allTransactions()
]);
});
Route::get('/history_transaction', function () {
return view('transaction/History_Transaction');
return view('transaction/History_Transaction',[
'name'=>'Jilhan Haura',
"transaction"=> transaction::allTransactions()
]);
});
Route::get('/Detail_History', function () {
return view('transaction/Detail_History_Transaction');});
return view('transaction/Detail_History_Transaction',[
'name'=>'Jilhan Haura',
"detail_transaction"=> transaction::allDetailTransactions()
]);
});
Route::get('/history_refund', function () {
return view('refund/history-refund',[
'name'=>'Jilhan Haura',
"history_refund" => Refund::HistoryRefund()
]);
});
Route::get('/detail_refund',function() {
return view('refund/detail-refund',[
'name'=>'Jilhan Haura',
"detail_refund"=> Refund::DetailRefund()
]);
});
Route::post('/refund-accept/{id}', 'ReturnItemController@acceptRefund')->name('refund/detail-refund/refund.accept');
Route::get('/refund-decline/{id}', 'ReturnItemController@declineRefund')->name('refund/detail-refund/refund.decline');