Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
sarawut keawrod
sop2-admin
Commits
561e1d11
Commit
561e1d11
authored
3 weeks ago
by
dcoreteam
Browse files
Options
Download
Email Patches
Plain Diff
update header
parent
de14de26
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
86 additions
and
87 deletions
+86
-87
resources/views/m2-planner/1-MonitorPage.blade.php
resources/views/m2-planner/1-MonitorPage.blade.php
+83
-84
resources/views/scaffold/planner.blade.php
resources/views/scaffold/planner.blade.php
+2
-2
resources/views/scaffold/scaffold-requests.blade.php
resources/views/scaffold/scaffold-requests.blade.php
+1
-1
No files found.
resources/views/m2-planner/1-MonitorPage.blade.php
View file @
561e1d11
...
...
@@ -8,7 +8,7 @@
<
link
rel
=
"stylesheet"
href
=
"{{ URL::asset('build/libs/gridjs/theme/mermaid.min.css') }}"
>
<
link
href
=
"https://cdn.jsdelivr.net/npm/select2@4.0.13/dist/css/select2.min.css"
rel
=
"stylesheet"
/>
<
link
rel
=
"stylesheet"
href
=
"https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css"
>
<
script
src
=
"https://code.jquery.com/jquery-3.6.0.min.js"
></
script
>
...
...
@@ -19,8 +19,10 @@
width
:
100
%
;
overflow
-
x
:
auto
;
}
div
.
dataTables_filter
{
text
-
align
:
left
!
important
;
/* จัดให้ชิดซ้าย */
text
-
align
:
left
!
important
;
/* จัดให้ชิดซ้าย */
}
</
style
>
@
endsection
...
...
@@ -36,7 +38,7 @@
<
div
class
=
"row"
>
<
div
class
=
"col-2"
>
<
h3
>
Project
All
</
h3
>
<
h3
>
Project
All
</
h3
>
</
div
>
<
div
class
=
"col-10"
>
<
div
class
=
"input-group"
>
...
...
@@ -44,13 +46,12 @@
<
select
id
=
"project-dropdown"
name
=
"project_id[]"
class
=
"form-select"
multiple
>
<
option
value
=
""
>--
All
Projects
--</
option
>
@
foreach
(
$main_project
as
$_main_project
)
<
option
value
=
"{{
$_main_project->id
}}"
>
{{
$_main_project
->
project_number
}}
{{
$_main_project
->
project_name
}}
<
option
value
=
"{{
$_main_project->id
}}"
>
{{
$_main_project
->
project_number
}}
{{
$_main_project
->
project_name
}}
</
option
>
@
endforeach
</
select
>
<
button
class
=
"btn btn-outline-secondary ml-5"
style
=
"margin-left: 10px;"
type
=
"submit"
>
Search
</
button
>
<
button
class
=
"btn btn-outline-secondary ml-5"
style
=
"margin-left: 10px;"
type
=
"submit"
>
Search
</
button
>
</
form
>
</
div
>
</
div
>
...
...
@@ -70,7 +71,7 @@
<
th
>
Request
No
.
</
th
>
<
th
>
SDR
NO
.
</
th
>
<
th
>
ENGINEER
</
th
>
<
th
>
D
EPARTMENT
</
th
>
<
th
>
D
epartment
</
th
>
<
th
>
EQP
/
LINE
NO
.
</
th
>
<
th
>
SCAFFOLD
TYPE
</
th
>
<
th
>
SCOPE
</
th
>
...
...
@@ -84,27 +85,27 @@
</
thead
>
<
tbody
>
@
if
(
isset
(
$sub_project
))
@
foreach
(
$sub_project
as
$key
=>
$_sub_project
)
<
tr
data
-
id
=
"{{
$_sub_project->id
}}"
>
<
td
>
{{
$_sub_project
->
id
}}
</
td
>
<
td
>
{{
$_sub_project
->
request_number
}}
</
td
>
<
td
>
{{
$_sub_project
->
sdr_number
}}
</
td
>
<
td
>
{{
$_sub_project
->
engineer
}}
</
td
>
<
td
>
{{
$_sub_project
->
department
}}
</
td
>
<
td
>
{{
$_sub_project
->
line_number
}}
</
td
>
<
td
>
{{
$_sub_project
->
scaffold_type
}}
</
td
>
<
td
>
{{
$_sub_project
->
scope
}}
</
td
>
<
td
>
{{
$_sub_project
->
description
}}
</
td
>
<
td
>
{{
$_sub_project
->
location
}}
</
td
>
<
td
>
{{
$_sub_project
->
date_requested
}}
</
td
>
<
td
>
{{
$_sub_project
->
date_removed
}}
</
td
>
<
td
>
{{
$_sub_project
->
tag_status
}}
</
td
>
<
td
></
td
>
<
td
></
td
>
</
tr
>
@
endforeach
@
if
(
isset
(
$sub_project
))
@
foreach
(
$sub_project
as
$key
=>
$_sub_project
)
<
tr
data
-
id
=
"{{
$_sub_project->id
}}"
>
<
td
>
{{
$_sub_project
->
id
}}
</
td
>
<
td
>
{{
$_sub_project
->
request_number
}}
</
td
>
<
td
>
{{
$_sub_project
->
sdr_number
}}
</
td
>
<
td
>
{{
$_sub_project
->
engineer
}}
</
td
>
<
td
>
{{
$_sub_project
->
department
}}
</
td
>
<
td
>
{{
$_sub_project
->
line_number
}}
</
td
>
<
td
>
{{
$_sub_project
->
scaffold_type
}}
</
td
>
<
td
>
{{
$_sub_project
->
scope
}}
</
td
>
<
td
>
{{
$_sub_project
->
description
}}
</
td
>
<
td
>
{{
$_sub_project
->
location
}}
</
td
>
<
td
>
{{
$_sub_project
->
date_requested
}}
</
td
>
<
td
>
{{
$_sub_project
->
date_removed
}}
</
td
>
<
td
>
{{
$_sub_project
->
tag_status
}}
</
td
>
<
td
></
td
>
<
td
></
td
>
</
tr
>
@
endforeach
@
endif
</
tbody
>
...
...
@@ -133,7 +134,7 @@
<
p
id
=
"datetime"
>
09
:
24
PM
</
p
>
<
p
class
=
"mb-0"
>
Order
from
</
p
>
<!--
<
button
onclick
=
"showPopup()"
>
Click
</
button
>
-->
</
li
>
...
...
@@ -145,14 +146,14 @@
<
li
>
<
h6
class
=
"fs-14"
>
Material
Planned
</
h6
>
<
p
class
=
"mb-3"
>
30
days
ago
</
p
>
</
li
>
<
li
>
<
h6
class
=
"fs-14"
>
Approve
</
h6
>
<
p
class
=
"mb-3"
>
1
week
ago
</
p
>
<
p
class
=
"text-muted fst-italic"
>
</
p
>
</
li
>
<
li
>
<
h6
class
=
"fs-14"
>
Inspected
</
h6
>
...
...
@@ -165,7 +166,7 @@
<
p
></
p
>
</
li
>
<
li
>
<
h6
class
=
"fs-14"
>
Reinspection
</
h6
>
<
h6
class
=
"fs-14"
>
Reinspection
</
h6
>
<
div
class
=
"time"
>
4
:
30
PM
</
div
>
<
p
></
p
>
</
li
>
...
...
@@ -211,7 +212,7 @@
<!--
end
row
-->
@
endsection
@
section
(
'script'
)
<
script
src
=
"{{ URL::asset('build/libs/apexcharts/apexcharts.min.js') }}"
></
script
>
<
script
src
=
"{{ URL::asset('build/libs/apexcharts/apexcharts.min.js') }}"
></
script
>
<
script
src
=
"{{ URL::asset('build/libs/list.js/list.min.js') }}"
></
script
>
<
script
src
=
"{{ URL::asset('build/libs/list.pagination.js/list.pagination.min.js') }}"
></
script
>
<
script
src
=
"{{ URL::asset('build/libs/sweetalert2/sweetalert2.min.js') }}"
></
script
>
...
...
@@ -237,42 +238,42 @@
<
script
src
=
"{{ URL::asset('build/js/app.js') }}"
></
script
>
<
script
src
=
"https://cdn.jsdelivr.net/npm/select2@4.0.13/dist/js/select2.min.js"
></
script
>
<
script
>
$
(
document
)
.
ready
(
function
()
{
$
(
'#order_data_table'
)
.
DataTable
({
"scrollX"
:
true
,
// เปิดการเลื่อนซ้าย-ขวา
});
$
(
document
)
.
ready
(
function
()
{
$
(
'#order_data_table'
)
.
DataTable
({
"scrollX"
:
true
,
// เปิดการเลื่อนซ้าย-ขวา
});
});
$
(
document
)
.
ready
(
function
()
{
let
selectedLabels
=
@
json
(
$project_id
);
// ดึงค่าที่ถูกเลือกจาก Controller
$
(
'#project-dropdown'
)
.
select2
({
placeholder
:
"Filter"
,
allowClear
:
true
,
closeOnSelect
:
false
,
// ป้องกัน dropdown ปิดเองเมื่อเลือก
templateSelection
:
function
(
selected
)
{
if
(
!
selected
.
id
)
return
selected
.
text
;
return
$
(
"<span >"
+
selected
.
text
+
"</span>"
);
},
templateResult
:
function
(
option
)
{
if
(
!
option
.
id
)
return
option
.
text
;
return
$
(
"<span>"
+
option
.
text
+
"</span>"
);
}
});
$
(
'#project-dropdown'
)
.
val
(
selectedLabels
)
.
trigger
(
'change'
);
$
(
document
)
.
ready
(
function
()
{
let
selectedLabels
=
@
json
(
$project_id
);
// ดึงค่าที่ถูกเลือกจาก Controller
$
(
'#project-dropdown'
)
.
select2
({
placeholder
:
"Filter"
,
allowClear
:
true
,
closeOnSelect
:
false
,
// ป้องกัน dropdown ปิดเองเมื่อเลือก
$
(
'#dataTable tbody'
)
.
on
(
'click'
,
'tr'
,
function
()
{
templateSelection
:
function
(
selected
)
{
if
(
!
selected
.
id
)
return
selected
.
text
;
return
$
(
"<span >"
+
selected
.
text
+
"</span>"
);
},
templateResult
:
function
(
option
)
{
if
(
!
option
.
id
)
return
option
.
text
;
return
$
(
"<span>"
+
option
.
text
+
"</span>"
);
}
});
$
(
'#project-dropdown'
)
.
val
(
selectedLabels
)
.
trigger
(
'change'
);
$
(
'#dataTable tbody'
)
.
on
(
'click'
,
'tr'
,
function
()
{
var
itemId
=
$
(
this
)
.
data
(
'id'
);
$
.
ajax
({
url
:
'/get-timeline/'
+
itemId
,
method
:
'GET'
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
updateTimeline
(
data
);
}
});
...
...
@@ -287,7 +288,7 @@ function updateTimeline(data) {
return
;
}
data
.
forEach
(
function
(
event
)
{
data
.
forEach
(
function
(
event
)
{
var
timelineItem
=
`
<div class="timeline-item">
<h5>${event.title}</h5>
...
...
@@ -299,33 +300,31 @@ function updateTimeline(data) {
});
}
});
});
function
showPopup
()
{
let
dateInput
=
prompt
(
"Enter date (YYYY-MM-DD):"
);
if
(
!
dateInput
)
return
;
// ถ้าไม่กรอกอะไรให้หยุดทำงาน
let
datePattern
=
/^
\
d
{
4
}
-
\
d
{
2
}
-
\
d
{
2
}
$
/
;
if
(
!
datePattern
.
test
(
dateInput
))
{
alert
(
"Invalid date format. Please use YYYY-MM-DD."
);
return
;
}
let
now
=
new
Date
();
let
hours
=
now
.
getHours
();
let
minutes
=
now
.
getMinutes
();
let
ampm
=
hours
>=
12
?
'PM'
:
'AM'
;
hours
=
hours
%
12
||
12
;
// แปลงเป็น 12 ชั่วโมง
minutes
=
minutes
<
10
?
'0'
+
minutes
:
minutes
;
let
timeString
=
hours
+
':'
+
minutes
+
' '
+
ampm
;
function
showPopup
()
{
let
dateInput
=
prompt
(
"Enter date (YYYY-MM-DD):"
);
if
(
!
dateInput
)
return
;
// ถ้าไม่กรอกอะไรให้หยุดทำงาน
if
(
confirm
(
"Update to "
+
dateInput
+
" "
+
timeString
+
"?"
))
{
document
.
getElementById
(
'datetime'
)
.
innerText
=
dateInput
+
" "
+
timeString
;
}
}
let
datePattern
=
/^
\
d
{
4
}
-
\
d
{
2
}
-
\
d
{
2
}
$
/
;
if
(
!
datePattern
.
test
(
dateInput
))
{
alert
(
"Invalid date format. Please use YYYY-MM-DD."
);
return
;
}
let
now
=
new
Date
();
let
hours
=
now
.
getHours
();
let
minutes
=
now
.
getMinutes
();
let
ampm
=
hours
>=
12
?
'PM'
:
'AM'
;
hours
=
hours
%
12
||
12
;
// แปลงเป็น 12 ชั่วโมง
minutes
=
minutes
<
10
?
'0'
+
minutes
:
minutes
;
let
timeString
=
hours
+
':'
+
minutes
+
' '
+
ampm
;
if
(
confirm
(
"Update to "
+
dateInput
+
" "
+
timeString
+
"?"
))
{
document
.
getElementById
(
'datetime'
)
.
innerText
=
dateInput
+
" "
+
timeString
;
}
}
</
script
>
@
endsection
This diff is collapsed.
Click to expand it.
resources/views/scaffold/planner.blade.php
View file @
561e1d11
...
...
@@ -85,13 +85,13 @@ class="table table-bordered border-primary nowrap table-striped align-middle"
<
tr
>
<
th
>
Action
</
th
>
<
th
>
Project
No
.
</
th
>
<
th
>
CustomerRefNo
.
</
th
>
<
th
>
Customer
Ref
No
.
</
th
>
<
th
>
Request
No
.
</
th
>
<
th
>
Discipline
Engineer
</
th
>
<
th
>
Location
</
th
>
<
th
>
Plant
</
th
>
<
th
>
Area
</
th
>
<
th
>
D
EPARTMENT
</
th
>
<
th
>
D
epartment
</
th
>
<
th
>
Usage
Time
</
th
>
<
th
>
EQP
/
LINE
NO
.
</
th
>
<
th
>
DESCRIPTION
</
th
>
...
...
This diff is collapsed.
Click to expand it.
resources/views/scaffold/scaffold-requests.blade.php
View file @
561e1d11
...
...
@@ -98,7 +98,7 @@ class="table table-bordered border-primary nowrap table-striped align-middle" st
<
th
>
Location
</
th
>
<
th
>
Plant
</
th
>
<
th
>
Area
</
th
>
<
th
>
D
EPARTMENT
</
th
>
<
th
>
D
epartment
</
th
>
<
th
>
Usage
Time
</
th
>
<
th
>
EQP
/
LINE
NO
.
</
th
>
<
th
>
DESCRIPTION
</
th
>
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment