feat: Add status change notification option in task popup and update task status handling
This commit is contained in:
106
.vscode/ftp-kr.sync.cache.json
vendored
106
.vscode/ftp-kr.sync.cache.json
vendored
@@ -9,8 +9,8 @@
|
|||||||
},
|
},
|
||||||
"api.php": {
|
"api.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 4261,
|
"size": 4208,
|
||||||
"lmtime": 1771100526209,
|
"lmtime": 1771236164949,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -28,8 +28,8 @@
|
|||||||
},
|
},
|
||||||
"class.Cron.php": {
|
"class.Cron.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 9391,
|
"size": 9593,
|
||||||
"lmtime": 1770937836455,
|
"lmtime": 1771237141363,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"class.DbModel.php": {
|
"class.DbModel.php": {
|
||||||
@@ -72,7 +72,13 @@
|
|||||||
"CrmController.php": {
|
"CrmController.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 1940,
|
"size": 1940,
|
||||||
"lmtime": 1771099681826,
|
"lmtime": 1771236164955,
|
||||||
|
"modified": false
|
||||||
|
},
|
||||||
|
"FinancesController.php": {
|
||||||
|
"type": "-",
|
||||||
|
"size": 6828,
|
||||||
|
"lmtime": 1771236164956,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"TasksController.php": {
|
"TasksController.php": {
|
||||||
@@ -86,12 +92,6 @@
|
|||||||
"size": 3914,
|
"size": 3914,
|
||||||
"lmtime": 1770653696575,
|
"lmtime": 1770653696575,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
|
||||||
"FinancesController.php": {
|
|
||||||
"type": "-",
|
|
||||||
"size": 6828,
|
|
||||||
"lmtime": 1771100264230,
|
|
||||||
"modified": false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"controls": {
|
"controls": {
|
||||||
@@ -107,12 +107,6 @@
|
|||||||
"lmtime": 0,
|
"lmtime": 0,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"class.Finances.php": {
|
|
||||||
"type": "-",
|
|
||||||
"size": 6614,
|
|
||||||
"lmtime": 0,
|
|
||||||
"modified": false
|
|
||||||
},
|
|
||||||
"class.Projects.php": {
|
"class.Projects.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 9521,
|
"size": 9521,
|
||||||
@@ -122,19 +116,19 @@
|
|||||||
"class.Site.php": {
|
"class.Site.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 1298,
|
"size": 1298,
|
||||||
"lmtime": 1771099882500,
|
"lmtime": 1771236164961,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"class.Tasks.php": {
|
"class.Tasks.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 22654,
|
"size": 23567,
|
||||||
"lmtime": 1770937828041,
|
"lmtime": 1771241116941,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"class.Users.php": {
|
"class.Users.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 4242,
|
"size": 4242,
|
||||||
"lmtime": 0,
|
"lmtime": 1770653518273,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"class.Wiki.php": {
|
"class.Wiki.php": {
|
||||||
@@ -142,12 +136,6 @@
|
|||||||
"size": 1825,
|
"size": 1825,
|
||||||
"lmtime": 0,
|
"lmtime": 0,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
|
||||||
"class.Crm.php": {
|
|
||||||
"type": "-",
|
|
||||||
"size": 247,
|
|
||||||
"lmtime": 1771099888168,
|
|
||||||
"modified": false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Domain": {
|
"Domain": {
|
||||||
@@ -155,7 +143,15 @@
|
|||||||
"ClientRepository.php": {
|
"ClientRepository.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 1592,
|
"size": 1592,
|
||||||
"lmtime": 1771099662028,
|
"lmtime": 1771236164957,
|
||||||
|
"modified": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Finances": {
|
||||||
|
"FinanceRepository.php": {
|
||||||
|
"type": "-",
|
||||||
|
"size": 16494,
|
||||||
|
"lmtime": 1771236164959,
|
||||||
"modified": false
|
"modified": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -169,13 +165,13 @@
|
|||||||
"MailToTaskImporter.php": {
|
"MailToTaskImporter.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 37982,
|
"size": 37982,
|
||||||
"lmtime": 1770937612534,
|
"lmtime": 1770800891666,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"TaskAttachmentRepository.php": {
|
"TaskAttachmentRepository.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 8806,
|
"size": 8806,
|
||||||
"lmtime": 1770937612535,
|
"lmtime": 1770731454505,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"WorkTimeRepository.php": {
|
"WorkTimeRepository.php": {
|
||||||
@@ -192,14 +188,6 @@
|
|||||||
"lmtime": 1770653480229,
|
"lmtime": 1770653480229,
|
||||||
"modified": false
|
"modified": false
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"Finances": {
|
|
||||||
"FinanceRepository.php": {
|
|
||||||
"type": "-",
|
|
||||||
"size": 16494,
|
|
||||||
"lmtime": 1771100224930,
|
|
||||||
"modified": false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"factory": {
|
"factory": {
|
||||||
@@ -212,7 +200,7 @@
|
|||||||
"class.Crm.php": {
|
"class.Crm.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 1434,
|
"size": 1434,
|
||||||
"lmtime": 1771099700900,
|
"lmtime": 1771236164963,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"class.Cron.php": {
|
"class.Cron.php": {
|
||||||
@@ -224,7 +212,7 @@
|
|||||||
"class.Finances.php": {
|
"class.Finances.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 3450,
|
"size": 3450,
|
||||||
"lmtime": 1771100409816,
|
"lmtime": 1771236164964,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"class.Projects.php": {
|
"class.Projects.php": {
|
||||||
@@ -235,8 +223,8 @@
|
|||||||
},
|
},
|
||||||
"class.Tasks.php": {
|
"class.Tasks.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 21447,
|
"size": 21700,
|
||||||
"lmtime": 1770937810551,
|
"lmtime": 1771237098140,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"class.Users.php": {
|
"class.Users.php": {
|
||||||
@@ -263,8 +251,8 @@
|
|||||||
".claude": {
|
".claude": {
|
||||||
"settings.local.json": {
|
"settings.local.json": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 287,
|
"size": 301,
|
||||||
"lmtime": 1771099575728,
|
"lmtime": 1771236164946,
|
||||||
"modified": false
|
"modified": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -277,8 +265,8 @@
|
|||||||
"config.php": {
|
"config.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 1232,
|
"size": 1232,
|
||||||
"lmtime": 1770937612536,
|
"lmtime": 1770587027872,
|
||||||
"modified": false
|
"modified": true
|
||||||
},
|
},
|
||||||
"cron.php": {
|
"cron.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
@@ -303,8 +291,8 @@
|
|||||||
"logs.txt": {
|
"logs.txt": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 3048,
|
"size": 3048,
|
||||||
"lmtime": 0,
|
"lmtime": 1770733260000,
|
||||||
"modified": false
|
"modified": true
|
||||||
},
|
},
|
||||||
"REFACTORING_PLAN.md": {
|
"REFACTORING_PLAN.md": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
@@ -341,14 +329,14 @@
|
|||||||
},
|
},
|
||||||
"task_edit.php": {
|
"task_edit.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 10285,
|
"size": 10758,
|
||||||
"lmtime": 1770937612539,
|
"lmtime": 1771237304287,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"task_popup.php": {
|
"task_popup.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 16702,
|
"size": 20929,
|
||||||
"lmtime": 1770937612540,
|
"lmtime": 1771241165284,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"task_single.php": {
|
"task_single.php": {
|
||||||
@@ -360,7 +348,7 @@
|
|||||||
"work-time.php": {
|
"work-time.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 12763,
|
"size": 12763,
|
||||||
"lmtime": 1771098956366,
|
"lmtime": 1771236164971,
|
||||||
"modified": false
|
"modified": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -408,7 +396,7 @@
|
|||||||
"textarea.php": {
|
"textarea.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 1383,
|
"size": 1383,
|
||||||
"lmtime": 1770937612537,
|
"lmtime": 1770733546656,
|
||||||
"modified": false
|
"modified": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -416,7 +404,7 @@
|
|||||||
"task-edit.php": {
|
"task-edit.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 7739,
|
"size": 7739,
|
||||||
"lmtime": 1770937612538,
|
"lmtime": 1770733570166,
|
||||||
"modified": false
|
"modified": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -424,13 +412,13 @@
|
|||||||
"client-edit.php": {
|
"client-edit.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 1998,
|
"size": 1998,
|
||||||
"lmtime": 1771099489547,
|
"lmtime": 1771236164967,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"main-view.php": {
|
"main-view.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 2103,
|
"size": 2103,
|
||||||
"lmtime": 1771099477641,
|
"lmtime": 1771236164967,
|
||||||
"modified": false
|
"modified": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -444,13 +432,13 @@
|
|||||||
"main-view.php": {
|
"main-view.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 13340,
|
"size": 13340,
|
||||||
"lmtime": 1771100368424,
|
"lmtime": 1771236164969,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"operation-edit.php": {
|
"operation-edit.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 4351,
|
"size": 4351,
|
||||||
"lmtime": 1771100291581,
|
"lmtime": 1771236164970,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"operations-list.php": {
|
"operations-list.php": {
|
||||||
|
|||||||
@@ -352,6 +352,15 @@ class Tasks
|
|||||||
|
|
||||||
$task_id = (int)\S::get( 'task_id' );
|
$task_id = (int)\S::get( 'task_id' );
|
||||||
$users = \S::get( 'users' );
|
$users = \S::get( 'users' );
|
||||||
|
$status_change_mail_value = \S::get( 'status_change_mail' );
|
||||||
|
$status_change_mail = 0;
|
||||||
|
|
||||||
|
if ( is_bool( $status_change_mail_value ) )
|
||||||
|
$status_change_mail = $status_change_mail_value ? 1 : 0;
|
||||||
|
elseif ( is_numeric( $status_change_mail_value ) )
|
||||||
|
$status_change_mail = (int)$status_change_mail_value === 1 ? 1 : 0;
|
||||||
|
elseif ( is_string( $status_change_mail_value ) )
|
||||||
|
$status_change_mail = in_array( strtolower( trim( $status_change_mail_value ) ), [ '1', 'on', 'true', 'yes' ], true ) ? 1 : 0;
|
||||||
|
|
||||||
if ( !$task_id ) {
|
if ( !$task_id ) {
|
||||||
echo json_encode( [ 'status' => 'error' ] );
|
echo json_encode( [ 'status' => 'error' ] );
|
||||||
@@ -366,6 +375,8 @@ class Tasks
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$mdb -> update( 'tasks', [ 'status_change_mail' => $status_change_mail ], [ 'id' => $task_id ] );
|
||||||
|
|
||||||
echo json_encode( [ 'status' => 'success' ] );
|
echo json_encode( [ 'status' => 'success' ] );
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -124,6 +124,12 @@
|
|||||||
</label>
|
</label>
|
||||||
<? endforeach; endif;?>
|
<? endforeach; endif;?>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="task-users-options">
|
||||||
|
<label class="task-user-label task-status-mail-label">
|
||||||
|
<input type="checkbox" class="task-status-change-mail-checkbox g-checkbox" value="1" <? if ( (int)$this -> task['status_change_mail'] === 1 ):?>checked="checked"<? endif;?>>
|
||||||
|
Powiadom o zmianie statusu:
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
<a href="#" class="btn btn-primary btn-sm js-save-task-users" task_id="<?= $this -> task['id'];?>" style="margin-top: 10px;">Zapisz</a>
|
<a href="#" class="btn btn-primary btn-sm js-save-task-users" task_id="<?= $this -> task['id'];?>" style="margin-top: 10px;">Zapisz</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -320,6 +326,14 @@
|
|||||||
.task_popup .task_details .task-user-label input[type="checkbox"] {
|
.task_popup .task_details .task-user-label input[type="checkbox"] {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
.task_popup .task_details .task-users-options {
|
||||||
|
margin-top: 10px;
|
||||||
|
padding-top: 10px;
|
||||||
|
border-top: 1px solid #e6e9ed;
|
||||||
|
}
|
||||||
|
.task_popup .task_details .task-status-mail-label {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
/* Lightbox - powiększanie zdjęć w opisie */
|
/* Lightbox - powiększanie zdjęć w opisie */
|
||||||
.task_popup .task_details .description img {
|
.task_popup .task_details .description img {
|
||||||
@@ -423,7 +437,7 @@
|
|||||||
|
|
||||||
if ( $.fn.iCheck )
|
if ( $.fn.iCheck )
|
||||||
{
|
{
|
||||||
popup.find( '.task-user-checkbox' ).iCheck({
|
popup.find( '.task-user-checkbox, .task-status-change-mail-checkbox' ).iCheck({
|
||||||
checkboxClass: 'icheckbox_square-blue',
|
checkboxClass: 'icheckbox_square-blue',
|
||||||
radioClass: 'iradio_square-blue'
|
radioClass: 'iradio_square-blue'
|
||||||
});
|
});
|
||||||
@@ -478,6 +492,7 @@
|
|||||||
var btn = $( this );
|
var btn = $( this );
|
||||||
var task_id = btn.attr( 'task_id' );
|
var task_id = btn.attr( 'task_id' );
|
||||||
var users = [];
|
var users = [];
|
||||||
|
var status_change_mail = popup.find( '.task-status-change-mail-checkbox' ).is( ':checked' ) ? 1 : 0;
|
||||||
popup.find( '.task-user-checkbox:checked' ).each( function() {
|
popup.find( '.task-user-checkbox:checked' ).each( function() {
|
||||||
users.push( $( this ).val() );
|
users.push( $( this ).val() );
|
||||||
});
|
});
|
||||||
@@ -485,7 +500,7 @@
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: '/tasks/task_change_users/',
|
url: '/tasks/task_change_users/',
|
||||||
data: { task_id: task_id, users: users },
|
data: { task_id: task_id, users: users, status_change_mail: status_change_mail },
|
||||||
success: function( response ) {
|
success: function( response ) {
|
||||||
var res = typeof response === 'string' ? JSON.parse( response ) : response;
|
var res = typeof response === 'string' ? JSON.parse( response ) : response;
|
||||||
if ( res.status === 'success' ) {
|
if ( res.status === 'success' ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user