Skip to content

Commit 370da29

Browse files
committed
list of order
1 parent 48b0306 commit 370da29

File tree

8 files changed

+406
-6
lines changed

8 files changed

+406
-6
lines changed

app/Http/Controllers/OrderController.php

+11
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,15 @@ public function makeOrderPost(Request $request, Product $product)
7171
return abort(500);
7272
}
7373
}
74+
75+
76+
public function orderData()
77+
{
78+
$title = "Order Data";
79+
80+
$orders = Order::with("bank", "note", "payment", "user", "status", "product")->latest()->get();
81+
82+
83+
return view("/order/order_data", compact("title", "orders"));
84+
}
7485
}

app/Models/Order.php

+31-1
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,42 @@
22

33
namespace App\Models;
44

5-
use Illuminate\Database\Eloquent\Factories\HasFactory;
65
use Illuminate\Database\Eloquent\Model;
6+
use Illuminate\Database\Eloquent\Factories\HasFactory;
77

88
class Order extends Model
99
{
1010
use HasFactory;
1111

1212
protected $guarded = ['id'];
13+
14+
public function bank()
15+
{
16+
return $this->belongsTo(Bank::class);
17+
}
18+
19+
public function note()
20+
{
21+
return $this->belongsTo(Note::class);
22+
}
23+
24+
public function payment()
25+
{
26+
return $this->belongsTo(Payment::class);
27+
}
28+
29+
public function product()
30+
{
31+
return $this->belongsTo(Product::class);
32+
}
33+
34+
public function status()
35+
{
36+
return $this->belongsTo(Status::class);
37+
}
38+
39+
public function user()
40+
{
41+
return $this->belongsTo(User::class);
42+
}
1343
}

composer.json

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"laravel/tinker": "^2.7"
1616
},
1717
"require-dev": {
18+
"barryvdh/laravel-debugbar": "^3.7",
1819
"fakerphp/faker": "^1.9.1",
1920
"laravel/pint": "^1.0",
2021
"laravel/sail": "^1.0.1",

composer.lock

+151-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/css/order.css

+77-4
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,6 @@ ul > li > a {
9292
color: black;
9393
}
9494

95-
/* div.collapseCC > div.accordion-body > div.form-check.w-100 > span.colapse_pilih_bank {
96-
cursor: pointer;
97-
} */
98-
9995
.collapse-pilih-bank {
10096
width: auto;
10197
margin-left: 45px;
@@ -221,6 +217,65 @@ div#container-petunjuk {
221217
}
222218
/* tutup petunjuk */
223219

220+
div.row > div.col-md-1 > div.detail-pemesanan > a[title="detail pemesanan"] {
221+
color: rgb(21, 156, 156) !important;
222+
font-size: 0.8rem !important;
223+
text-decoration: none !important;
224+
cursor: pointer !important;
225+
}
226+
227+
/* modal detail data pemesanan */
228+
div.fade.modal#ModalDetailDataPemesanan {
229+
font-family: "Quicksand", sans-serif;
230+
}
231+
232+
.close:focus {
233+
outline: 1px dotted #fff !important;
234+
}
235+
236+
.modal-body.detail {
237+
padding: 0rem !important;
238+
}
239+
240+
.modal-title {
241+
color: #fff;
242+
}
243+
244+
.modal-header {
245+
background: black;
246+
color: #fff !important;
247+
}
248+
249+
.fa-close {
250+
color: #fff;
251+
}
252+
253+
.heading {
254+
font-weight: 500 !important;
255+
}
256+
257+
.subheadings {
258+
font-size: 12px;
259+
color: black;
260+
}
261+
262+
.dots {
263+
height: 10px;
264+
width: 10px;
265+
background-color: green;
266+
border-radius: 50%;
267+
display: inline-block;
268+
margin-right: 5px;
269+
}
270+
271+
.gallery img {
272+
margin-right: 10px;
273+
}
274+
275+
.fs-9 {
276+
font-size: 9px;
277+
}
278+
224279
/* style discont strikethrough */
225280
span.strikethrough {
226281
position: relative;
@@ -240,3 +295,21 @@ span.strikethrough:before {
240295
-o-transform: rotate(-5deg);
241296
transform: rotate(-5deg);
242297
}
298+
299+
.badgebox {
300+
opacity: 0;
301+
}
302+
303+
.badgebox + .badge {
304+
text-indent: -999999px;
305+
width: 27px;
306+
}
307+
308+
.badgebox:focus + .badge {
309+
box-shadow: inset 0px 0px 5px;
310+
}
311+
312+
.badgebox:checked + .badge {
313+
/* Move the check mark back when checked */
314+
text-indent: 0;
315+
}

0 commit comments

Comments
 (0)