Feat(SQL, UI): 1. Perfected architecture for modular Search functionality across heirarchical Get Many and Calc Stored Procedures that allows text search filtering on different fields as well as by record Id with control over how the filters are applied. \n 2. Updated User Calc and Get Many Stored Procedures with new Search functionality. \n 3. Improved styles on Dog Command Link page.
This commit is contained in:
@@ -25,17 +25,21 @@ export default class PageDogDogCommandLinks extends TableBasePage {
|
||||
hookupFilters() {
|
||||
this.sharedHookupFilters();
|
||||
this.hookupFilterDog();
|
||||
this.hookupFilterCommandCategory();
|
||||
this.hookupFilterCommand();
|
||||
this.hookupFilterActive();
|
||||
}
|
||||
hookupFilterDog() {
|
||||
this.hookupFilter(attrIdDog);
|
||||
/*, (event, filterDog) => {
|
||||
}
|
||||
hookupFilterCommandCategory() {
|
||||
this.hookupFilter(attrIdCommandCategory, (event, filterCommandCategory) => {
|
||||
// loadDogCommandLinks();
|
||||
// let wasDirtyFilter = filterDog.classList.contains(flagDirty);
|
||||
PageDogDogCommandLinks.isDirtyFilter(filterDog);
|
||||
let isDirtyFilter = filterDog.classList.contains(flagDirty);
|
||||
let idDog = DOM.getElementValueCurrent(filterDog);
|
||||
let commands = dogs[idDog];
|
||||
// let wasDirtyFilter = filterCommandCategory.classList.contains(flagDirty);
|
||||
PageDogDogCommandLinks.isDirtyFilter(filterCommandCategory);
|
||||
let isDirtyFilter = filterCommandCategory.classList.contains(flagDirty);
|
||||
let idCommandCategory = DOM.getElementValueCurrent(filterCommandCategory);
|
||||
let commands = filterCommands.filter(command => command[attrIdCommandCategory] == idCommandCategory);
|
||||
let filterCommand = document.querySelector(idFormFilters + ' .' + flagCommand);
|
||||
let idCommandPrevious = filterCommand.getAttribute(attrValuePrevious);
|
||||
filterCommand.innerHTML = '';
|
||||
@@ -48,8 +52,8 @@ export default class PageDogDogCommandLinks extends TableBasePage {
|
||||
filterCommand.appendChild(option);
|
||||
});
|
||||
filterCommand.dispatchEvent(new Event('change'));
|
||||
return isDirtyFilter;
|
||||
});
|
||||
*/
|
||||
}
|
||||
hookupFilterCommand() {
|
||||
this.hookupFilter(attrIdCommand);
|
||||
@@ -119,7 +123,7 @@ export default class PageDogDogCommandLinks extends TableBasePage {
|
||||
let tdCommand = row.querySelector('td.' + flagCommand);
|
||||
let inputHandSignalDescription = row.querySelector('td.' + flagHandSignalDescription + ' textarea');
|
||||
let inputNotes = row.querySelector('td.' + flagNotes + ' textarea');
|
||||
let buttonActive = row.querySelector(':scope > td.' + flagActive + ' button');
|
||||
let buttonActive = row.querySelector('td.' + flagActive + ' .' + flagActive);
|
||||
|
||||
let jsonRow = {};
|
||||
jsonRow[attrIdDogCommandLink] = row.getAttribute(attrIdDogCommandLink);
|
||||
@@ -131,40 +135,69 @@ export default class PageDogDogCommandLinks extends TableBasePage {
|
||||
return jsonRow;
|
||||
}
|
||||
initialiseRowNew(tbody, row) {
|
||||
this.initialiseRowNewDdlsDogAndCommand(row);
|
||||
/*
|
||||
this.initialiseRowNewDdlsDog(row);
|
||||
this.initialiseRowNewDdlsCommandCategory(row);
|
||||
this.initialiseRowNewDdlsCommand(row);
|
||||
this.initialiseRowNewDdlsDogAndCommand(row);
|
||||
let checkboxIsSubscription = row.querySelector('td.' + flagIsSubscription + ' input');
|
||||
let checkboxDoesExpireFasterOnceUnsealed = row.querySelector('td.' + flagDoesExpireFasterOnceUnsealed + ' input');
|
||||
this.handleChangeCheckboxDoesExpireFasterOnceUnsealed(null, checkboxDoesExpireFasterOnceUnsealed);
|
||||
this.handleChangeCheckboxIsSubscription(null, checkboxIsSubscription);
|
||||
*/
|
||||
}
|
||||
initialiseRowNewDdlsDogAndCommand(row) {
|
||||
initialiseRowNewDdlsDog(row) {
|
||||
let ddlDogFilter = document.querySelector(idFormFilters + ' #' + attrIdDog);
|
||||
let idDogFilter = DOM.getElementValueCurrent(ddlDogFilter);
|
||||
let hasDogFilter = !(Validation.isEmpty(idDogFilter) || idDogFilter == '0');
|
||||
let ddlCommandFilter = document.querySelector(idFormFilters + ' #' + attrIdCommand);
|
||||
let idCommandFilter = DOM.getElementValueCurrent(ddlCommandFilter);
|
||||
let hasCommandFilter = !(Validation.isEmpty(idCommandFilter) || idCommandFilter == '0');
|
||||
if (_verbose) {
|
||||
console.log("initialiseRowNew: ", row);
|
||||
console.log({ ddlDogFilter, idDogFilter, hasDogFilter });
|
||||
}
|
||||
if (!hasDogFilter) return;
|
||||
let ddlDog = row.querySelector('td.' + flagDog + ' select');
|
||||
DOM.setElementValuesCurrentAndPrevious(ddlDog, idDogFilter);
|
||||
this.handleChangeDogDdl(null, ddlDog);
|
||||
}
|
||||
initialiseRowNewDdlsCommandCategory(row) {
|
||||
let idCommandCategoryFilter = this.getIdCommandCategoryFilter();
|
||||
let hasCommandCategoryFilter = this.getHasCommandCategoryFilter();
|
||||
if (_verbose) {
|
||||
console.log("initialiseRowNew: ", row);
|
||||
console.log({ddlDogFilter, idDogFilter, hasDogFilter, idCommandCategoryFilter, hasCommandCategoryFilter});
|
||||
}
|
||||
if (!hasCommandCategoryFilter) return;
|
||||
let ddlCommandCategory = row.querySelector('td.' + flagCommandCategory + ' select');
|
||||
DOM.setElementValuesCurrentAndPrevious(ddlCommandCategory, idCommandCategoryFilter);
|
||||
}
|
||||
initialiseRowNewDdlsCommand(row) {
|
||||
let idCommandFilter = this.getIdCommandFilter();
|
||||
let hasCommandFilter = this.getHasCommandFilter();
|
||||
if (_verbose) {
|
||||
console.log("initialiseRowNew: ", row);
|
||||
console.log({ddlDogFilter, idDogFilter, hasDogFilter, ddlCommandFilter, idCommandFilter, hasCommandFilter});
|
||||
}
|
||||
if (!hasDogFilter && !hasCommandFilter) return;
|
||||
if (hasDogFilter) {
|
||||
let ddlDog = row.querySelector('td.' + flagDog + ' select');
|
||||
DOM.setElementValuesCurrentAndPrevious(ddlDog, idDogFilter);
|
||||
this.handleChangeDogDdl(null, ddlDog);
|
||||
}
|
||||
if (hasCommandFilter) {
|
||||
let ddlCommand = row.querySelector('td.' + flagCommand + ' select');
|
||||
DOM.setElementValuesCurrentAndPrevious(ddlCommand, idCommandFilter);
|
||||
}
|
||||
if (!hasCommandFilter) return;
|
||||
let ddlCommand = row.querySelector('td.' + flagCommand + ' select');
|
||||
DOM.setElementValuesCurrentAndPrevious(ddlCommand, idCommandFilter);
|
||||
}
|
||||
postInitialiseRowNewCallback(tbody) {
|
||||
let newRows = tbody.querySelectorAll('tr.' + flagRowNew);
|
||||
let newestRow = newRows[newRows.length - 1];
|
||||
let clickableElementsSelector = [
|
||||
'td.' + flagDog + ' div.' + flagDog
|
||||
, ',td.' + flagCommandCategory + ' div.' + flagCommandCategory
|
||||
, ',td.' + flagCommand + ' div.' + flagCommand
|
||||
].join('');
|
||||
newestRow.querySelectorAll(clickableElementsSelector).forEach((clickableElement) => {
|
||||
clickableElement.click();
|
||||
});
|
||||
}
|
||||
|
||||
hookupTableMain() {
|
||||
super.hookupTableMain();
|
||||
this.hookupFieldsDog();
|
||||
this.hookupFieldsCommandCategory();
|
||||
this.hookupFieldsCommand();
|
||||
this.hookupTextareasHandSignalDescription();
|
||||
this.hookupTextareasNotes();
|
||||
|
||||
Reference in New Issue
Block a user