Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
3
3f-timesheet
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dockers
3f-timesheet
Commits
559d7f38
Commit
559d7f38
authored
Nov 01, 2022
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
delete draft function in screen filter chargeable
parent
a0d64f28
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
64 additions
and
2 deletions
+64
-2
packages/portal/timesheet/resources/views/form/deletedraftconfirmation.blade.php
+30
-0
packages/portal/timesheet/resources/views/form/filterChargeable.blade.php
+4
-1
packages/portal/timesheet/routes/web.php
+2
-0
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
+0
-1
packages/portal/timesheet/src/Http/Controllers/FormController.php
+28
-0
No files found.
packages/portal/timesheet/resources/views/form/deletedraftconfirmation.blade.php
0 → 100644
View file @
559d7f38
@
extends
(
'ui::layouts.app'
)
@
section
(
'content'
)
<
div
class
="
ui
segment
">
<a class="
ui
blue
left
ribbon
label
">Draft Delete Confirmation</a>
<br>
<!-- <p style="
color
:
red
">This page is still in maintenance.. TQ</p> -->
<div class="
ui
segment
">
<div class="
ui
form
">
<div class="
content
text
-
center
">
<p>
Are you sure you want to delete this draft ?
</p>
<!-- date('F', mktime(0, 0, 0,
$monthNum
, 10)) -->
<strong>
Timesheet : @if(data_get(
$tm
,'tm_phase') == 1) 1st Halfmonth @else 2nd Halfmonth @endif - {{ date('F', mktime(0, 0, 0, data_get(
$tm
,'tm_month'), 10 )) }} -
{
{data_get($tm,'tm_year')}
}
</strong>
<br><br>
<button type="
button
" class="
ui
red
button
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
form
.
draftdeleted
', ['
tmid
'=>data_get($tm,'
id
')]) }}'
;
">Yes</button>
<!-- <button class="
ui
red
button
" type="
submit
">Yes</button> -->
<button type="
button
" class="
ui
blue
button
" onclick="
window
.
location
.
href
=
' {{route('
timesheet
::
form
.
filterChargeable
')}} '
;
">No</button>
</div>
</div>
</div>
</div>
@endsection
\ No newline at end of file
packages/portal/timesheet/resources/views/form/filterChargeable.blade.php
View file @
559d7f38
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<div class="
ui
segment
">
<div class="
ui
segment
">
<a class="
ui
purple
left
ribbon
label
">Edit Timesheet</a>
<a class="
ui
purple
left
ribbon
label
">Edit Timesheet</a>
<br>
<br>
<table class="
ui
unstackable
celled
striped
table
">
<table class="
ui
unstackable
celled
table
">
<thead>
<thead>
<tr>
<tr>
<th class="
text
-
center
">No</th>
<th class="
text
-
center
">No</th>
...
@@ -40,6 +40,9 @@
...
@@ -40,6 +40,9 @@
<button class="
ui
purple
compact
icon
button
" type="
button
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
form
.
chargeableForm
', ['
phase
' => data_get($draft,'
tm_phase
'), '
month
' =>data_get($draft,'
tm_month
')] ) }}'
;
">
<button class="
ui
purple
compact
icon
button
" type="
button
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
form
.
chargeableForm
', ['
phase
' => data_get($draft,'
tm_phase
'), '
month
' =>data_get($draft,'
tm_month
')] ) }}'
;
">
<i class="
edit
outline
icon
"></i>
<i class="
edit
outline
icon
"></i>
</button>
</button>
<button class="
ui
red
compact
icon
button
" type="
button
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
form
.
deletedraft
', ['
tmid
'=>data_get($draft,'
id
')]) }}'
;
">
<i class="
trash
alternate
outline
icon
"></i>
</button>
</td>
</td>
</tr>
</tr>
@endforeach
@endforeach
...
...
packages/portal/timesheet/routes/web.php
View file @
559d7f38
...
@@ -105,6 +105,8 @@ Route::group(
...
@@ -105,6 +105,8 @@ Route::group(
Route
::
post
(
'resubmit'
,[
'uses'
=>
'FormController@resubmit'
,
'as'
=>
'form.resubmit'
]);
Route
::
post
(
'resubmit'
,[
'uses'
=>
'FormController@resubmit'
,
'as'
=>
'form.resubmit'
]);
Route
::
post
(
'resubmitoverhead'
,[
'uses'
=>
'FormController@resubmitoverhead'
,
'as'
=>
'form.resubmitoverhead'
]);
Route
::
post
(
'resubmitoverhead'
,[
'uses'
=>
'FormController@resubmitoverhead'
,
'as'
=>
'form.resubmitoverhead'
]);
Route
::
get
(
'resubmitconfirm'
,[
'uses'
=>
'FormController@resubmitconfirm'
,
'as'
=>
'form.resubmitconfirm'
]);
Route
::
get
(
'resubmitconfirm'
,[
'uses'
=>
'FormController@resubmitconfirm'
,
'as'
=>
'form.resubmitconfirm'
]);
Route
::
get
(
'deletedraft'
,[
'uses'
=>
'FormController@deletedraft'
,
'as'
=>
'form.deletedraft'
]);
Route
::
get
(
'draftdeleted'
,[
'uses'
=>
'FormController@draftdeleted'
,
'as'
=>
'form.draftdeleted'
]);
// nonChargeableForm
// nonChargeableForm
...
...
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
View file @
559d7f38
...
@@ -1318,7 +1318,6 @@ class DashboardController extends Controller
...
@@ -1318,7 +1318,6 @@ class DashboardController extends Controller
if
(
$check
)
if
(
$check
)
{
{
$chargehour
=
Ts_detail
::
where
(
'fk_tm_id'
,
$check
->
id
)
$chargehour
=
Ts_detail
::
where
(
'fk_tm_id'
,
$check
->
id
)
->
where
(
'td_project_type'
,
$chargeable
)
->
where
(
'td_project_type'
,
$chargeable
)
// ->where('td_hours', '!=', 0)
// ->where('td_hours', '!=', 0)
...
...
packages/portal/timesheet/src/Http/Controllers/FormController.php
View file @
559d7f38
...
@@ -47,6 +47,9 @@ class FormController extends Controller
...
@@ -47,6 +47,9 @@ class FormController extends Controller
$checkdraft
=
Ts_master
::
where
(
'tm_staff_id'
,
$user
->
staff_id
)
$checkdraft
=
Ts_master
::
where
(
'tm_staff_id'
,
$user
->
staff_id
)
->
where
(
'tm_timesheet_master_sts'
,
1
)
->
where
(
'tm_timesheet_master_sts'
,
1
)
->
orderby
(
'tm_year'
,
'desc'
)
->
orderby
(
'tm_month'
,
'desc'
)
->
orderby
(
'tm_phase'
,
'desc'
)
->
get
();
->
get
();
// dd($checkdraft);
// dd($checkdraft);
...
@@ -2111,4 +2114,28 @@ class FormController extends Controller
...
@@ -2111,4 +2114,28 @@ class FormController extends Controller
return
redirect
()
->
route
(
'timesheet::dashboard.index'
)
->
withSuccess
(
'Rejected overhead has been resubmit 😊'
);
return
redirect
()
->
route
(
'timesheet::dashboard.index'
)
->
withSuccess
(
'Rejected overhead has been resubmit 😊'
);
}
}
public
function
deletedraft
(
Request
$request
)
{
$tmasterid
=
data_get
(
$request
,
'tmid'
);
$tm
=
Ts_master
::
where
(
'id'
,
$tmasterid
)
->
first
();
// dd("tmid = ".$tmasterid);
return
view
(
'timesheet::form.deletedraftconfirmation'
,
compact
(
'tm'
));
}
public
function
draftdeleted
(
Request
$request
)
{
// dd($request);
$tmid
=
data_get
(
$request
,
'tmid'
);
Ts_master
::
where
(
'id'
,
$tmid
)
->
delete
();
Ts_detail
::
where
(
'fk_tm_id'
,
$tmid
)
->
delete
();
Tproject
::
where
(
'fk_tm_id'
,
$tmid
)
->
delete
();
// dd($checktp);
return
redirect
()
->
route
(
'timesheet::form.filterChargeable'
)
->
withSuccess
(
'Draft Successfully Deleted'
);
}
}
}
\ No newline at end of file
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