mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-11-18 02:20:37 -05:00
Customer page lists: short paid badge, aligned icons, appointment link
* The invoice list's paid badge is short so each invoice stays on one line: "Paid", or "Paid +3d" when it was paid in full 3 days after its date, with the day on hover. The invoice page keeps the date. * The estimate and invoice lists are laid out in columns (checkbox, number, date, status, actions), so the edit/view icons line up. * Ticked estimates (and redmine_qbo_vehicles' vehicles) fill in redmine_qbo_calendar's Add appointment link (estimate_id, vehicle_id) as well as New issue. Estimate checkboxes are only on the customer page, where they're used. * application.js is gone: it only carried the old Google Calendar link code, which threw an error when a box was ticked on a vehicle page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
40eb6205c4
commit
92f9eb1bc7
11 files changed
+117
-72
No files matched your search
@@ -1,20 +0,0 @@
|
||||
function updateLink() {
|
||||
console.log("updateLink called");
|
||||
const linkElement = document.getElementById("appointment_link");
|
||||
const regex = /((?:<br\/>|%3Cbr\/?%3E))([\s\S]*?)(&dates)/gi;
|
||||
linkElement.href = linkElement.href.replace(regex, `$1${getSelectedDocs()}$3`);
|
||||
}
|
||||
|
||||
function getSelectedDocs() {
|
||||
const appointent_extras = document.querySelectorAll('.appointment');
|
||||
|
||||
let output = '';
|
||||
for (const item of appointent_extras) {
|
||||
if (item.checked) {
|
||||
console.log(`Checked item: ${item.dataset.text} with URL: ${item.dataset.url}`);
|
||||
output += `%0A`+ encodeURIComponent(`<a href="${window.location.origin}${item.dataset.url}">${item.dataset.text}</a>`) +`%0A`;
|
||||
}
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
Reference in new issue
Block a user