5
5
Layout = " ~/Views/Shared/_Layout.cshtml" ;
6
6
}
7
7
8
- <h1 >Mexanik (Topshiruvchi)</h1 >
9
-
10
8
<form asp-controller =" MechanicHandovers" asp-action =" Index" >
11
9
<div class =" row" >
12
10
<div class =" d-flex justify-content-between" >
13
11
<!-- Search -->
14
12
<div class =" col-md-4 mb-4" >
15
13
<div class =" input-group" >
16
- <input type =" text" class =" form-control rounded-left" placeholder =" mexanik yoki haydoshchini izlash..." name =" searchString" value =" @ViewBag.SearchString" >
14
+ <input type =" text" class =" form-control rounded-left" placeholder =" mexanik yoki haydovchini izlash..." name =" searchString" value =" @ViewBag.SearchString" >
17
15
<div class =" input-group-append" >
18
16
<button type =" submit" class =" btn btn-primary" >
19
17
<i class =" fa fa-search" ></i > Qidirish
41
39
<div class =" col-12" >
42
40
<ejs-grid id =" mechanicHandovers-list" dataSource =" @ViewBag.MechanicHandovers" gridLines =" Vertical" allowSorting =" true" dataBound =" onDataBound" >
43
41
<e-grid-columns >
44
- <e-grid-column headerText =" Id" field =" Id" template =" #templat" type =" number" width =" 60" ></e-grid-column >
45
- <e-grid-column headerText =" Mexanik F.I.SH" field =" MechanicName" type =" string" ></e-grid-column >
46
- <e-grid-column headerText =" Haydovchi F.I.SH" field =" DriverName" type =" string" ></e-grid-column >
47
- <e-grid-column headerText =" Mashina" field =" CarName" template =" #template" type =" string" ></e-grid-column >
48
- <e-grid-column headerText =" Boshlang'ich masofa" field =" Distance" type =" number" ></e-grid-column >
49
- <e-grid-column headerText =" Yoqilg`i qoldig`i" field =" RemainingFuel" type =" number" ></e-grid-column >
50
- <e-grid-column headerText =" Ro'yxatdan o'tgan vaqt" field =" Date" type =" date" format =" dd-MM-yyyy | HH:mm" ></e-grid-column >
51
- <e-grid-column headerText =" Topshirish" field =" IsHanded" type =" string" width =" 100" ></e-grid-column >
52
- <e-grid-column headerText =" Izoh" field =" Comments" type =" string" ></e-grid-column >
53
- <e-grid-column headerText =" Status" field =" Status" type =" number" ></e-grid-column >
42
+ <e-grid-column headerText =" Id" field =" Id" template =" #templat" type =" number" textAlign =Center headerTextAlign =Center width =" 50" ></e-grid-column >
43
+ <e-grid-column headerText =" Mexanik F.I.SH" field =" MechanicName" type =" string" textAlign =Center headerTextAlign =Center width =" 200" ></e-grid-column >
44
+ <e-grid-column headerText =" Haydovchi F.I.SH" field =" DriverName" type =" string" textAlign =Center headerTextAlign =Center width =" 200" ></e-grid-column >
45
+ <e-grid-column headerText =" Mashina" field =" CarName" template =" #template" type =" string" textAlign =Center headerTextAlign =Center ></e-grid-column >
46
+ <e-grid-column headerText =" Ro'yxatdan o'tgan vaqt" field =" Date" type =" date" format =" dd-MM-yyyy | HH:mm" textAlign =Center headerTextAlign =Center ></e-grid-column >
47
+ <e-grid-column headerText =" Status" field =" Status" template =" #statusColumnTemplate" textAlign =Center headerTextAlign =Center width =" 100" ></e-grid-column >
54
48
</e-grid-columns >
55
49
</ejs-grid >
56
50
</div >
151
145
});
152
146
}
153
147
148
+ </script >
149
+
150
+ <script id =" statusColumnTemplate" type =" text/x-template" >
151
+ ${if(Status == 0)}
152
+ <span class =" badge bg-warning" >Kutilmoqda</span >
153
+ ${else if(Status == 1)}
154
+ <span class =" badge bg-success" >Yakunlangan</span >
155
+ ${else if(Status == 2)}
156
+ <span class =" badge bg-danger" >Rad etilgan</span >
157
+ ${else if(Status == 4)}
158
+ <span class =" badge bg-danger" >Haydovchi tomonidan rad etilgan</span >
159
+ ${/if}
154
160
</script >
0 commit comments