Feat: Assessment page complete and new Home page layout for marketing phase 1 of the customer acquisition plan and offering a demo and for trainers to join the alpha trials. Reporting images created for radar diagram of Command mastery by Command Category; line graph of single command progress measured by obedience level, response latency, and compliance duration over time; Calendar Entries page filtered to unpaid bill calendary entries created using dummy data created in web server as database implementation not yet started.
This commit is contained in:
@@ -48,7 +48,22 @@ export default class BasePage {
|
||||
this.hookupNavigation();
|
||||
this.hookupOverlays();
|
||||
}
|
||||
|
||||
hookupLogos() {
|
||||
Events.hookupEventHandler("click", "." + flagImageLogo + "," + "." + flagLogo, (event, element) => {
|
||||
Utils.consoleLogIfNotProductionEnvironment('clicking logo');
|
||||
this.router.navigateToHash(hashPageHome);
|
||||
});
|
||||
}
|
||||
/*
|
||||
hookupEventHandler(eventType, selector, callback) {
|
||||
Events.initialiseEventHandler(selector, flagInitialised, (element) => {
|
||||
element.addEventListener(eventType, (event) => {
|
||||
event.stopPropagation();
|
||||
callback(event, element);
|
||||
});
|
||||
});
|
||||
}
|
||||
*/
|
||||
hookupNavigation() {
|
||||
Events.hookupEventHandler("click", idButtonHamburger, (event, element) => {
|
||||
let overlayHamburger = document.querySelector(idOverlayHamburger);
|
||||
@@ -79,14 +94,7 @@ export default class BasePage {
|
||||
this.hookupButtonsNavDogButtonIcons();
|
||||
this.hookupButtonsNavDogCommandButtonLinks();
|
||||
this.hookupButtonsNavDogAssessments();
|
||||
}
|
||||
hookupEventHandler(eventType, selector, callback) {
|
||||
Events.initialiseEventHandler(selector, flagInitialised, (element) => {
|
||||
element.addEventListener(eventType, (event) => {
|
||||
event.stopPropagation();
|
||||
callback(event, element);
|
||||
});
|
||||
});
|
||||
this.hookupButtonsNavDogCalendarEntries();
|
||||
}
|
||||
hookupButtonsNavHome() {
|
||||
this.hookupButtonsNav('.' + flagNavHome, hashPageHome);
|
||||
@@ -154,12 +162,8 @@ export default class BasePage {
|
||||
hookupButtonsNavDogAssessments() {
|
||||
this.hookupButtonsNav('.' + flagNavDogAssessments, hashPageDogAssessments);
|
||||
}
|
||||
|
||||
hookupLogos() {
|
||||
Events.hookupEventHandler("click", "." + flagImageLogo + "," + "." + flagLogo, (event, element) => {
|
||||
Utils.consoleLogIfNotProductionEnvironment('clicking logo');
|
||||
this.router.navigateToHash(hashPageHome);
|
||||
});
|
||||
hookupButtonsNavDogCalendarEntries() {
|
||||
this.hookupButtonsNav('.' + flagNavDogCalendarEntries, hashPageDogCalendarEntries);
|
||||
}
|
||||
|
||||
hookupOverlays() {
|
||||
|
||||
100
static/js/pages/dog/calendar_entries.js
Normal file
100
static/js/pages/dog/calendar_entries.js
Normal file
@@ -0,0 +1,100 @@
|
||||
|
||||
import API from "../../api.js";
|
||||
import BusinessObjects from "../../lib/business_objects/business_objects.js";
|
||||
import DOM from "../../dom.js";
|
||||
import Events from "../../lib/events.js";
|
||||
import TableBasePage from "../base_table.js";
|
||||
import Utils from "../../lib/utils.js";
|
||||
import Validation from "../../lib/validation.js";
|
||||
import DogTableMixinPage from "./mixin_table.js";
|
||||
|
||||
export default class PageDogCalendarEntries extends TableBasePage {
|
||||
static hash = hashPageDogCalendarEntries;
|
||||
static attrIdRowObject = attrIdCalendarEntry;
|
||||
callSaveTableContent = API.saveCalendarEntries;
|
||||
|
||||
constructor(router) {
|
||||
super(router);
|
||||
this.dogMixin = new DogTableMixinPage(this);
|
||||
}
|
||||
|
||||
initialize() {
|
||||
this.sharedInitialize();
|
||||
}
|
||||
|
||||
hookupFilters() {
|
||||
this.sharedHookupFilters();
|
||||
// this.hookupFilterCalendarEntryType();
|
||||
this.hookupFilterActive();
|
||||
}
|
||||
/*
|
||||
hookupFilterCalendarEntryType() {
|
||||
let filterSelector = idFormFilters + ' #' + attrIdCalendarEntryType;
|
||||
let filterCalendarEntryTypeOld = document.querySelector(filterSelector);
|
||||
filterCalendarEntryTypeOld.removeAttribute('id');
|
||||
let parentDiv = filterCalendarEntryTypeOld.parentElement;
|
||||
let isChecked = (DOM.getElementAttributeValuePrevious(parentDiv) == "True");
|
||||
let filterCalendarEntryTypeNew = document.querySelector(idFormFilters + ' div.' + flagCalendarEntryTypeOnly + '.' + flagContainerInput + ' svg.' + flagCalendarEntryTypeOnly);
|
||||
filterCalendarEntryTypeNew.setAttribute('id', flagCalendarEntryTypeOnly);
|
||||
if (isChecked) filterCalendarEntryTypeNew.classList.add(flagIsChecked);
|
||||
|
||||
Events.hookupEventHandler("click", filterSelector, (event, filterCalendarEntryType) => {
|
||||
Utils.consoleLogIfNotProductionEnvironment({ filterCalendarEntryType });
|
||||
Utils.consoleLogIfNotProductionEnvironment({ [filterCalendarEntryType.tagName]: filterCalendarEntryType.tagName });
|
||||
let svgElement = (filterCalendarEntryType.tagName.toUpperCase() == 'SVG') ? filterCalendarEntryType : filterCalendarEntryType.parentElement;
|
||||
let wasChecked = svgElement.classList.contains(flagIsChecked);
|
||||
if (wasChecked) {
|
||||
svgElement.classList.remove(flagIsChecked);
|
||||
}
|
||||
else {
|
||||
svgElement.classList.add(flagIsChecked);
|
||||
}
|
||||
return this.handleChangeFilter(event, filterCalendarEntryType);
|
||||
});
|
||||
let filter = document.querySelector(filterSelector);
|
||||
let filterValuePrevious = DOM.getElementValueCurrent(filter);
|
||||
filter.setAttribute(attrValueCurrent, filterValuePrevious);
|
||||
filter.setAttribute(attrValuePrevious, filterValuePrevious);
|
||||
}
|
||||
*/
|
||||
|
||||
loadRowTable(rowJson) {
|
||||
if (rowJson == null) return;
|
||||
if (_verbose) { Utils.consoleLogIfNotProductionEnvironment("applying data row: ", rowJson); }
|
||||
}
|
||||
getJsonRow(row) {
|
||||
Utils.consoleLogIfNotProductionEnvironment({ row });
|
||||
if (row == null) return;
|
||||
let inputCode = row.querySelector('td.' + flagCode + ' .' + flagCode);
|
||||
let inputName = row.querySelector('td.' + flagName + ' .' + flagName);
|
||||
let buttonActive = row.querySelector('td.' + flagActive + ' .' + flagActive);
|
||||
|
||||
console.log("inputCode");
|
||||
console.log(inputCode);
|
||||
|
||||
let jsonRow = {};
|
||||
jsonRow[attrIdCalendarEntry] = row.getAttribute(attrIdCalendarEntry);
|
||||
jsonRow[flagCode] = DOM.getElementAttributeValueCurrent(inputCode);
|
||||
jsonRow[flagName] = DOM.getElementAttributeValueCurrent(inputName);
|
||||
jsonRow[flagActive] = buttonActive.classList.contains(flagDelete);
|
||||
return jsonRow;
|
||||
}
|
||||
initialiseRowNew(tbody, row) {
|
||||
|
||||
}
|
||||
postInitialiseRowNewCallback(tbody) {
|
||||
// let newRows = tbody.querySelectorAll('tr.' + flagRowNew);
|
||||
}
|
||||
|
||||
hookupTableMain() {
|
||||
super.hookupTableMain();
|
||||
this.hookupFieldsCodeTable();
|
||||
this.hookupFieldsNameTable();
|
||||
this.hookupFieldsActive();
|
||||
}
|
||||
|
||||
leave() {
|
||||
super.leave();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import PageDogButtonIcons from './pages/dog/button_icons.js';
|
||||
import PageDogCommandButtonLinks from './pages/dog/command_button_links.js';
|
||||
import PageDogAssessment from './pages/dog/assessment.js';
|
||||
import PageDogAssessments from './pages/dog/assessments.js';
|
||||
import PageDogCalendarEntries from './pages/dog/calendar_entries.js'
|
||||
// Legal
|
||||
import PageAccessibilityReport from './pages/legal/accessibility_report.js';
|
||||
import PageAccessibilityStatement from './pages/legal/accessibility_statement.js';
|
||||
@@ -50,6 +51,7 @@ export default class Router {
|
||||
this.pages[hashPageDogCommandButtonLinks] = { name: 'PageDogCommandButtonLinks', module: PageDogCommandButtonLinks };
|
||||
this.pages[hashPageDogAssessment] = { name: 'PageDogAssessment', module: PageDogAssessment };
|
||||
this.pages[hashPageDogAssessments] = { name: 'PageDogAssessments', module: PageDogAssessments };
|
||||
this.pages[hashPageDogCalendarEntries] = { name: 'PageDogCalendarEntries', module: PageDogCalendarEntries };
|
||||
// Legal
|
||||
this.pages[hashPageAccessibilityStatement] = { name: 'PageAccessibilityStatement', module: PageAccessibilityStatement };
|
||||
this.pages[hashPageDataRetentionSchedule] = { name: 'PageDataRetentionSchedule', module: PageRetentionSchedule };
|
||||
@@ -76,6 +78,7 @@ export default class Router {
|
||||
this.routes[hashPageDogCommandButtonLinks] = (isPopState = false) => this.navigateToHash(hashPageDogCommandButtonLinks, isPopState);
|
||||
this.routes[hashPageDogAssessment] = (isPopState = false) => this.navigateToHash(hashPageDogAssessment, isPopState);
|
||||
this.routes[hashPageDogAssessments] = (isPopState = false) => this.navigateToHash(hashPageDogAssessments, isPopState);
|
||||
this.routes[hashPageDogCalendarEntries] = (isPopState = false) => this.navigateToHash(hashPageDogCalendarEntries, isPopState);
|
||||
// Legal
|
||||
this.routes[hashPageAccessibilityStatement] = (isPopState = false) => this.navigateToHash(hashPageAccessibilityStatement, isPopState);
|
||||
this.routes[hashPageDataRetentionSchedule] = (isPopState = false) => this.navigateToHash(hashPageDataRetentionSchedule, isPopState);
|
||||
|
||||
Reference in New Issue
Block a user