mirror of
https://github.com/itflow-org/itflow
synced 2026-11-21 11:57:25 +00:00
QoL 61: the task approval picker says agent with the usual blank choices, pickers filled in by script use the same blank choices as when rendered, asset details and statement lines show None or Not for a client instead of a dash, the ticket Billing filter starts at Any, record pages say Upload Files and cron counts problems without (s)
This commit is contained in:
@@ -228,6 +228,7 @@ Update from Maintenance > Update — Queue Update hands the job to cron, which u
|
||||
- Forms: hints inside empty fields are plain examples - example.com, Contracts, Closing remarks - rather than e.g. ..., ex. ... and Enter a ..., and address fields bring up the web keyboard on a phone. New Location and New Network open at the size their Edit windows do, and the transactions list's amount filters take 1,000.00 like every other money field.
|
||||
- Messages: the message after a window closes matches its button - created after Create, saved after Save - where some said added, updated or edited. Copying an invoice says which invoice it was copied to, making one recurring names the new recurring invoice, a payment on several invoices says how many it paid and who the receipt was queued to, and attaching files to a ticket without a reply says so rather than Ticket updated.
|
||||
- Client portal and emailed links: what a client sees after accepting or declining a quote, approving a task or sending a file reads the same from an emailed link as in the portal - Thank you - quote QUO-79 is accepted and our team has been told, rather than Quote Accepted. Card payment problems are in plain words - Card payments are not set up, rather than Stripe credentials missing. A link that isn't right, online payment that isn't available, or a payment that can't be confirmed shows the same page as a mistyped invoice link, rather than an Oops line on an empty page.
|
||||
- Wording: a ticket task's approval picker says agent rather than technician, with the same blank choice as other pickers - - Select one - and - Select an agent - rather than Select... and - Select a user -. Pickers that fill in as you go read like the rest: changing a ticket's client offers - Select a contact - (or - No contacts -), a project with no client offers - Nobody -, and an asset detail or statement line with nothing picked shows - None - or - Not for a client - rather than a bare dash. The Tickets list's Billing filter starts at - Any -, record pages say Upload Files rather than Upload File(s), and Maintenance > Cron's log counts 1 problem rather than 1 problem(s).
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
|
||||
@@ -352,7 +352,7 @@ if (mysqli_num_rows($sql) == 0) {
|
||||
<i class="fas fa-fw fa-file-alt text-secondary me-2"></i>Document
|
||||
</a>
|
||||
<a class="dropdown-item ajax-modal" href="#" data-modal-url="modals/file/file_upload.php?<?= $client_url ?>&asset_id=<?= $asset_id ?>">
|
||||
<i class="fas fa-fw fa-upload text-secondary me-2"></i>Upload File(s)
|
||||
<i class="fas fa-fw fa-upload text-secondary me-2"></i>Upload Files
|
||||
</a>
|
||||
<a class="dropdown-item ajax-modal" href="#" data-modal-url="modals/asset/asset_note_add.php?id=<?= $asset_id ?>">
|
||||
<i class="fas fa-fw fa-sticky-note text-secondary me-2"></i>Note
|
||||
|
||||
@@ -279,7 +279,7 @@ if (!$can_support) {
|
||||
<i class="fas fa-fw fa-file-alt text-secondary me-2"></i>Document
|
||||
</a>
|
||||
<a class="dropdown-item ajax-modal" href="#" data-modal-url="modals/file/file_upload.php?<?= $client_url ?>&contact_id=<?= $contact_id ?>">
|
||||
<i class="fas fa-fw fa-upload text-secondary me-2"></i>Upload File(s)
|
||||
<i class="fas fa-fw fa-upload text-secondary me-2"></i>Upload Files
|
||||
</a>
|
||||
<a class="dropdown-item ajax-modal" href="#" data-modal-size="lg" data-modal-url="modals/software/software_add.php?client_id=<?= $client_id ?>&contact_id=<?= $contact_id ?>">
|
||||
<i class="fas fa-fw fa-cube text-secondary me-2"></i>License
|
||||
|
||||
@@ -252,7 +252,7 @@ $steps = ['upload' => 'Statement', 'columns' => 'Columns', 'review' => 'Review']
|
||||
<span class="input-group-text"><i class="fas fa-fw fa-user"></i></span>
|
||||
<select class="form-select" data-import-bulk-client aria-label="Client for the ticked lines">
|
||||
<option value="">- Client for the ticked -</option>
|
||||
<option value="0">Not for a client</option>
|
||||
<option value="0">- Not for a client -</option>
|
||||
<?= $client_options ?>
|
||||
</select>
|
||||
</div>
|
||||
@@ -331,7 +331,7 @@ $steps = ['upload' => 'Statement', 'columns' => 'Columns', 'review' => 'Review']
|
||||
</td>
|
||||
<td class="itflow-import-pick">
|
||||
<select class="form-select form-select-sm" data-import-client data-value="<?= intval($line['client_id']) ?>" aria-label="Client">
|
||||
<option value="0">-</option>
|
||||
<option value="0">- Not for a client -</option>
|
||||
<?= $client_options ?>
|
||||
</select>
|
||||
<div class="form-check form-switch small mt-1 mb-0" data-import-billable-box>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
return;
|
||||
}
|
||||
contactSelect.innerHTML = '';
|
||||
contactSelect.add(new Option('Nobody', '0'));
|
||||
contactSelect.add(new Option('- Nobody -', '0'));
|
||||
const internal = !clientId || clientId === '0';
|
||||
if (contactField) {
|
||||
contactField.hidden = internal;
|
||||
|
||||
@@ -31,7 +31,7 @@ itflowReady(function () {
|
||||
.then(function (response) {
|
||||
contactSelect.innerHTML = '';
|
||||
if (response.contacts && response.contacts.length > 0) {
|
||||
contactSelect.appendChild(new Option('Select a contact', ''));
|
||||
contactSelect.appendChild(new Option('- Select a contact -', ''));
|
||||
response.contacts.forEach(function (contact) {
|
||||
// new Option() sets text content, so contact names are
|
||||
// never parsed as markup. The picker draws their avatar
|
||||
@@ -50,12 +50,12 @@ itflowReady(function () {
|
||||
contactSelect.appendChild(option);
|
||||
});
|
||||
} else {
|
||||
contactSelect.appendChild(new Option('No contacts found', ''));
|
||||
contactSelect.appendChild(new Option('- No contacts -', ''));
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.error('AJAX Error:', error);
|
||||
contactSelect.innerHTML = '<option value="">Failed to load contacts</option>';
|
||||
contactSelect.innerHTML = '<option value="">- Could not load contacts -</option>';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ if (!$license || ($client_url && intval($license['software_client_id']) !== intv
|
||||
<i class="fas fa-fw fa-file-alt text-secondary me-2"></i>Document
|
||||
</a>
|
||||
<a class="dropdown-item ajax-modal" href="#" data-modal-url="modals/file/file_upload.php?client_id=<?= $client_id ?>&software_id=<?= $software_id ?>">
|
||||
<i class="fas fa-fw fa-upload text-secondary me-2"></i>Upload File(s)
|
||||
<i class="fas fa-fw fa-upload text-secondary me-2"></i>Upload Files
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -216,7 +216,7 @@ if (!$location || ($client_url && intval($location['location_client_id']) !== in
|
||||
<i class="fas fa-fw fa-file-alt text-secondary me-2"></i>Document
|
||||
</a>
|
||||
<a class="dropdown-item ajax-modal" href="#" data-modal-url="modals/file/file_upload.php?client_id=<?= $client_id ?>&location_id=<?= $location_id ?>">
|
||||
<i class="fas fa-fw fa-upload text-secondary me-2"></i>Upload File(s)
|
||||
<i class="fas fa-fw fa-upload text-secondary me-2"></i>Upload Files
|
||||
</a>
|
||||
<?php } ?>
|
||||
<?php if (moduleOn('trips')) { ?>
|
||||
|
||||
@@ -262,7 +262,7 @@ $asset_form_icons = [
|
||||
<span class="input-group-text"><i class="fas fa-fw <?= $spec['icon'] ?>"></i></span>
|
||||
<?php if ($spec['input'] === 'select') { ?>
|
||||
<select class="form-select select2" name="spec[<?= $spec_key ?>]" id="<?= $spec_id ?>">
|
||||
<option value="">-</option>
|
||||
<option value="">- None -</option>
|
||||
<?php foreach ($spec['options'] as $spec_option) { ?>
|
||||
<option <?= strcasecmp($spec_option, $spec_value) === 0 ? 'selected' : '' ?>><?= escapeHtml($spec_option) ?></option>
|
||||
<?php } ?>
|
||||
|
||||
@@ -63,11 +63,11 @@ ob_start();
|
||||
|
||||
|
||||
<div class="mb-3 d-none" id="specific_user_wrapper">
|
||||
<label class="form-label">Technician <strong class="text-danger">*</strong></label>
|
||||
<label class="form-label">Agent <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><i class="fas fa-fw fa-user-circle"></i></span>
|
||||
<select class="form-select select2" name="approval_required_user_id" id="specific_user_select">
|
||||
<option value="">- Select a user -</option>
|
||||
<option value="">- Select an agent -</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -119,15 +119,15 @@ ob_start();
|
||||
|
||||
if (scope === 'internal') {
|
||||
setOptions(typeSelect, [
|
||||
['', 'Select...'],
|
||||
['any', 'Any other technician'],
|
||||
['specific', 'A specific technician']
|
||||
['', '- Select one -'],
|
||||
['any', 'Any other agent'],
|
||||
['specific', 'A specific agent']
|
||||
]);
|
||||
}
|
||||
|
||||
if (scope === 'client') {
|
||||
setOptions(typeSelect, [
|
||||
['', 'Select...'],
|
||||
['', '- Select one -'],
|
||||
['any', 'Ticket contact'],
|
||||
['technical', 'Technical contacts'],
|
||||
['billing', 'Billing contacts']
|
||||
|
||||
@@ -88,9 +88,9 @@ ob_start();
|
||||
|
||||
// In words - the raw scope/type pair ("Internal", "Any") meant nothing on screen
|
||||
if ($approval_scope == 'internal' && $approval_type == 'specific') {
|
||||
$approval_who = $approval_user_name ?: 'A specific technician';
|
||||
$approval_who = $approval_user_name ?: 'A specific agent';
|
||||
} elseif ($approval_scope == 'internal') {
|
||||
$approval_who = 'Any other technician';
|
||||
$approval_who = 'Any other agent';
|
||||
} elseif ($approval_type == 'technical') {
|
||||
$approval_who = "The client's technical contacts";
|
||||
} elseif ($approval_type == 'billing') {
|
||||
|
||||
@@ -493,7 +493,7 @@ $export_extra = [
|
||||
<div class="col-lg-3 col-md-6">
|
||||
<label class="form-label small text-body-secondary mb-1">Billing</label>
|
||||
<select class="form-select select2" name="billing" onchange="this.form.submit()">
|
||||
<option value="">Any</option>
|
||||
<option value="">- Any -</option>
|
||||
<?php foreach ($billing_filters as $billing_option => [$billing_option_label]) { ?>
|
||||
<option value="<?= $billing_option ?>" <?= $billing_filter === $billing_option ? 'selected' : '' ?>><?= $billing_option_label ?></option>
|
||||
<?php } ?>
|
||||
|
||||
@@ -314,7 +314,7 @@ if (!$vendor || (isset($_GET['client_id']) && $vendor_client_id !== intval($clie
|
||||
<i class="fas fa-fw fa-file-alt text-secondary me-2"></i>Document
|
||||
</a>
|
||||
<a class="dropdown-item ajax-modal" href="#" data-modal-url="modals/file/file_upload.php?client_id=<?= $client_id ?>&vendor_id=<?= $vendor_id ?>">
|
||||
<i class="fas fa-fw fa-upload text-secondary me-2"></i>Upload File(s)
|
||||
<i class="fas fa-fw fa-upload text-secondary me-2"></i>Upload Files
|
||||
</a>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
@@ -227,6 +227,12 @@ function cronHealthMail($subject, array $email, $to = null) {
|
||||
return count(emailQueue($recipients, $subject, $email));
|
||||
}
|
||||
|
||||
/** "1 problem", "3 problems". */
|
||||
function cronHealthProblemsText(array $problems) {
|
||||
$n = count($problems);
|
||||
return $n . ' ' . ($n === 1 ? 'problem' : 'problems');
|
||||
}
|
||||
|
||||
/*
|
||||
* The Cron Watch job: email about problems that are new, still there a day
|
||||
* later, or gone. Cron is running when this runs, so "isn't running" never
|
||||
@@ -270,13 +276,13 @@ function cronHealthWatch() {
|
||||
cronHealthSaveState($state);
|
||||
|
||||
if (!$new && !$reminders && !$fixed) {
|
||||
return [$problems ? count($problems) . ' problem(s), already emailed' : 'All well'];
|
||||
return [$problems ? cronHealthProblemsText($problems) . ', already emailed' : 'All well'];
|
||||
}
|
||||
if (intval($settings['config_cron_alert_email'] ?? 1) !== 1) {
|
||||
return ['Email alerts are off - ' . count($problems) . ' problem(s)'];
|
||||
return ['Email alerts are off - ' . cronHealthProblemsText($problems)];
|
||||
}
|
||||
if (!emailReady()) {
|
||||
return ['No mail server is set up - ' . count($problems) . ' problem(s)'];
|
||||
return ['No mail server is set up - ' . cronHealthProblemsText($problems)];
|
||||
}
|
||||
|
||||
$count = cronHealthAlert($new, $reminders, count($fixed), count($problems));
|
||||
|
||||
Reference in New Issue
Block a user