Browse Source

bunch of little fixes

develop
Rob Colbert 12 months ago
parent
commit
efa8437b48
  1. 12
      app/views/client/editor.pug
  2. 2
      app/views/client/view.pug
  3. 9
      app/views/report/components/weekly-summary.pug
  4. 1
      app/views/report/dashboard.pug
  5. 7
      client/js/time-tracker-client.js

12
app/views/client/editor.pug

@ -42,5 +42,13 @@ block view-content
).uk-input ).uk-input
.uk-text-small.uk-text-muted Use zero or 168 (7 x 24) for unlimited hours per week. .uk-text-small.uk-text-muted Use zero or 168 (7 x 24) for unlimited hours per week.
.uk-card-footer.uk-flex.uk-flex-right .uk-card-footer
button(type="submit").uk-button.uk-button-default.uk-border-rounded #[span= !!client ? "Update" : "Create"] Client div(uk-grid).uk-grid-small.uk-flex-right
.uk-width-auto
a(href=`/client/${client._id}`).uk-button.uk-button-default.uk-border-rounded
i.fa-solid.fa-chevron-left
span.uk-margin-small-left Back
.uk-width-auto
button(type="submit").uk-button.uk-button-default.uk-border-rounded
i.fa-solid.fa-save
span.uk-margin-small-left #{!!client ? "Update" : "Create"} Client

2
app/views/client/view.pug

@ -13,7 +13,7 @@ block view-content
.uk-width-auto .uk-width-auto
a(href=`/client/${client._id}/edit`).uk-button.uk-button-default.uk-button-small a(href=`/client/${client._id}/edit`).uk-button.uk-button-default.uk-button-small
i.fa-solid.fa-cog i.fa-solid.fa-cog
span.uk-margin-small-left Edit Client span.uk-margin-small-left Settings
.uk-width-auto .uk-width-auto
a(href=`/client/${client._id}/project/create`).uk-button.uk-button-default.uk-button-small a(href=`/client/${client._id}/project/create`).uk-button.uk-button-default.uk-button-small
i.fa-solid.fa-plus i.fa-solid.fa-plus

9
app/views/report/components/weekly-summary.pug

@ -1,5 +1,6 @@
mixin renderWeeklySummaryReport (data) mixin renderWeeklySummaryReport (data)
table.uk-table.uk-table-small.uk-table-responsive.no-select .uk-overflow-auto
table.uk-table.uk-table-small.no-select
thead thead
tr tr
th Project th Project
@ -10,8 +11,10 @@ mixin renderWeeklySummaryReport (data)
tbody tbody
each row in data each row in data
tr tr
td.uk-table-expand=row.project.name td.uk-table-expand
td= row.project.client.name a(href=`/client/${row.project.client._id}/project/${row.project._id}`)=row.project.name
td
a(href=`/client/${row.project.client._id}`)= row.project.client.name
td= formatCount(row.sessionCount) td= formatCount(row.sessionCount)
td= numeral(row.duration).format('0:00:00') td= numeral(row.duration).format('0:00:00')
td= numeral(row.billable).format('$0,0.00') td= numeral(row.billable).format('$0,0.00')

1
app/views/report/dashboard.pug

@ -10,6 +10,7 @@ block view-content
.uk-margin-medium .uk-margin-medium
h2 Daily Hours h2 Daily Hours
.uk-overflow-auto
table.uk-table.uk-table-small.uk-table-divider table.uk-table.uk-table-small.uk-table-divider
thead thead
tr tr

7
client/js/time-tracker-client.js

@ -47,6 +47,7 @@ export class TimeTrackerApp extends DtpApp {
/* /*
* Page Visibility API hooks * Page Visibility API hooks
*/ */
window.addEventListener('pageshow', this.onWindowPageShow.bind(this));
window.addEventListener('pagehide', this.onWindowPageHide.bind(this)); window.addEventListener('pagehide', this.onWindowPageHide.bind(this));
window.addEventListener('freeze', this.onWindowFreeze.bind(this)); window.addEventListener('freeze', this.onWindowFreeze.bind(this));
window.addEventListener('resume', this.onWindowResume.bind(this)); window.addEventListener('resume', this.onWindowResume.bind(this));
@ -74,10 +75,16 @@ export class TimeTrackerApp extends DtpApp {
this.haveFocus = false; this.haveFocus = false;
} }
async onWindowPageShow (event) {
this.log.debug('onWindowPageShow', 'the page is being shown', { event });
}
async onWindowPageHide (event) { async onWindowPageHide (event) {
this.log.debug('onWindowPageHide', 'the page is being hidden', { event }); this.log.debug('onWindowPageHide', 'the page is being hidden', { event });
if (!event.persisted) {
await this.socket.disconnect(); await this.socket.disconnect();
} }
}
async onWindowFreeze (event) { async onWindowFreeze (event) {
this.log.debug('onWindowFreeze', 'the page is being frozen', { event }); this.log.debug('onWindowFreeze', 'the page is being frozen', { event });

Loading…
Cancel
Save