Add comment skeleton loaders, workflow validation, monthly schedule fix
- TicketView.php: Show 3 lt-skeleton-card placeholders in the comment list
while "Load more" fetches; skeletons are removed on resolve or error
- ticket.css: Add .comment-skeleton margin spacing
- WorkflowDesignerView.php + manage_workflows.php: Prevent creating/editing
status transitions where from_status === to_status (client + server check)
- RecurringTicketsView.php: Expand monthly day picker from 28 to 31 days
(days 29-31 labelled "last day in short months")
- RecurringTicketModel.php: Clamp monthly schedule day to last day of target
month using format('t') instead of hard-capping at 28
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -212,10 +212,10 @@ function updateScheduleOptions() {
|
||||
});
|
||||
} else if (type === 'monthly') {
|
||||
dayRow.classList.remove('is-hidden');
|
||||
for (var i = 1; i <= 28; i++) {
|
||||
for (var i = 1; i <= 31; i++) {
|
||||
var opt = document.createElement('option');
|
||||
opt.value = String(i);
|
||||
opt.textContent = 'Day ' + i;
|
||||
opt.textContent = 'Day ' + i + (i > 28 ? ' (last day in short months)' : '');
|
||||
daySelect.appendChild(opt);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -216,6 +216,10 @@ function saveTransition(e) {
|
||||
requires_admin: document.getElementById('requires_admin').checked ? 1 : 0,
|
||||
is_active: document.getElementById('wf_is_active').checked ? 1 : 0,
|
||||
};
|
||||
if (data.from_status === data.to_status) {
|
||||
lt.toast.error('From Status and To Status cannot be the same');
|
||||
return;
|
||||
}
|
||||
var url = '/api/manage_workflows.php' + (data.transition_id ? '?id=' + data.transition_id : '');
|
||||
var apiCall = data.transition_id ? lt.api.put(url, data) : lt.api.post(url, data);
|
||||
apiCall.then(function (result) {
|
||||
|
||||
Reference in New Issue
Block a user