linting
parent
33c62a4a62
commit
87a74d3570
|
|
@ -1,23 +1,25 @@
|
|||
import { testAdmin } from "../../../test/_globals.js";
|
||||
import { logout, login, ajaxDelayMillis } from "../../support/index.js";
|
||||
describe("Admin - Cleanup Database", () => {
|
||||
beforeEach("Loads page", () => {
|
||||
import { testAdmin } from '../../../test/_globals.js';
|
||||
import { logout, login, ajaxDelayMillis } from '../../support/index.js';
|
||||
describe('Admin - Cleanup Database', () => {
|
||||
beforeEach('Loads page', () => {
|
||||
logout();
|
||||
login(testAdmin);
|
||||
cy.visit("/admin/cleanup");
|
||||
cy.location("pathname").should("equal", "/admin/cleanup");
|
||||
cy.visit('/admin/cleanup');
|
||||
cy.location('pathname').should('equal', '/admin/cleanup');
|
||||
});
|
||||
afterEach(logout);
|
||||
it("Has no detectable accessibility issues", () => {
|
||||
it('Has no detectable accessibility issues', () => {
|
||||
cy.injectAxe();
|
||||
cy.checkA11y();
|
||||
});
|
||||
it("Cleans up the database", () => {
|
||||
it('Cleans up the database', () => {
|
||||
cy.get("button[data-cy='cleanup']").click();
|
||||
cy.get(".modal").should("be.visible").should("contain.text", "Cleanup");
|
||||
cy.get('.modal').should('be.visible').should('contain.text', 'Cleanup');
|
||||
cy.get(".modal button[data-cy='ok']").click();
|
||||
cy.wait(ajaxDelayMillis);
|
||||
cy.get(".modal").should("contain.text", "Cleaned Up").should("contain.text", "Success");
|
||||
cy.get('.modal')
|
||||
.should('contain.text', 'Cleaned Up')
|
||||
.should('contain.text', 'Success');
|
||||
cy.get(".modal button[data-cy='ok']").click();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,36 +1,37 @@
|
|||
/* eslint-disable unicorn/filename-case, promise/catch-or-return, promise/always-return */
|
||||
|
||||
import { testAdmin } from "../../../test/_globals.js";
|
||||
import { testAdmin } from '../../../test/_globals.js'
|
||||
|
||||
import { logout, login, ajaxDelayMillis } from "../../support/index.js";
|
||||
import { logout, login, ajaxDelayMillis } from '../../support/index.js'
|
||||
|
||||
describe("Admin - Cleanup Database", () => {
|
||||
describe('Admin - Cleanup Database', () => {
|
||||
beforeEach('Loads page', () => {
|
||||
logout()
|
||||
login(testAdmin)
|
||||
cy.visit('/admin/cleanup')
|
||||
cy.location('pathname').should('equal', '/admin/cleanup')
|
||||
})
|
||||
|
||||
beforeEach("Loads page", () => {
|
||||
logout();
|
||||
login(testAdmin);
|
||||
cy.visit("/admin/cleanup");
|
||||
cy.location("pathname").should("equal", "/admin/cleanup");
|
||||
});
|
||||
afterEach(logout)
|
||||
|
||||
afterEach(logout);
|
||||
it('Has no detectable accessibility issues', () => {
|
||||
cy.injectAxe()
|
||||
cy.checkA11y()
|
||||
})
|
||||
|
||||
it("Has no detectable accessibility issues", () => {
|
||||
cy.injectAxe();
|
||||
cy.checkA11y();
|
||||
});
|
||||
it('Cleans up the database', () => {
|
||||
cy.get("button[data-cy='cleanup']").click()
|
||||
|
||||
it("Cleans up the database", () => {
|
||||
cy.get("button[data-cy='cleanup']").click();
|
||||
cy.get('.modal').should('be.visible').should('contain.text', 'Cleanup')
|
||||
|
||||
cy.get(".modal").should("be.visible").should("contain.text", "Cleanup");
|
||||
cy.get(".modal button[data-cy='ok']").click()
|
||||
|
||||
cy.get(".modal button[data-cy='ok']").click();
|
||||
cy.wait(ajaxDelayMillis)
|
||||
|
||||
cy.wait(ajaxDelayMillis);
|
||||
cy.get('.modal')
|
||||
.should('contain.text', 'Cleaned Up')
|
||||
.should('contain.text', 'Success')
|
||||
|
||||
cy.get(".modal").should("contain.text", "Cleaned Up").should("contain.text", "Success");
|
||||
|
||||
cy.get(".modal button[data-cy='ok']").click();
|
||||
});
|
||||
});
|
||||
cy.get(".modal button[data-cy='ok']").click()
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
import { testAdmin } from "../../../test/_globals.js";
|
||||
import { logout, login } from "../../support/index.js";
|
||||
describe("Admin - Config Table Management", () => {
|
||||
beforeEach("Loads page", () => {
|
||||
import { testAdmin } from '../../../test/_globals.js';
|
||||
import { logout, login } from '../../support/index.js';
|
||||
describe('Admin - Config Table Management', () => {
|
||||
beforeEach('Loads page', () => {
|
||||
logout();
|
||||
login(testAdmin);
|
||||
cy.visit("/admin/tables");
|
||||
cy.location("pathname").should("equal", "/admin/tables");
|
||||
cy.visit('/admin/tables');
|
||||
cy.location('pathname').should('equal', '/admin/tables');
|
||||
});
|
||||
afterEach(logout);
|
||||
it("Has no detectable accessibility issues", () => {
|
||||
cy.get(".tabs a").each(($tab) => {
|
||||
it('Has no detectable accessibility issues', () => {
|
||||
cy.get('.tabs a').each(($tab) => {
|
||||
cy.wrap($tab).click({ force: true });
|
||||
cy.injectAxe();
|
||||
cy.checkA11y();
|
||||
|
|
|
|||
|
|
@ -1,25 +1,24 @@
|
|||
/* eslint-disable unicorn/filename-case, promise/catch-or-return, promise/always-return */
|
||||
|
||||
import { testAdmin } from "../../../test/_globals.js";
|
||||
import { testAdmin } from '../../../test/_globals.js'
|
||||
|
||||
import { logout, login } from "../../support/index.js";
|
||||
import { logout, login } from '../../support/index.js'
|
||||
|
||||
describe("Admin - Config Table Management", () => {
|
||||
describe('Admin - Config Table Management', () => {
|
||||
beforeEach('Loads page', () => {
|
||||
logout()
|
||||
login(testAdmin)
|
||||
cy.visit('/admin/tables')
|
||||
cy.location('pathname').should('equal', '/admin/tables')
|
||||
})
|
||||
|
||||
beforeEach("Loads page", () => {
|
||||
logout();
|
||||
login(testAdmin);
|
||||
cy.visit("/admin/tables");
|
||||
cy.location("pathname").should("equal", "/admin/tables");
|
||||
});
|
||||
afterEach(logout)
|
||||
|
||||
afterEach(logout);
|
||||
|
||||
it("Has no detectable accessibility issues", () => {
|
||||
cy.get(".tabs a").each(($tab) => {
|
||||
cy.wrap($tab).click({ force: true });
|
||||
cy.injectAxe();
|
||||
cy.checkA11y();
|
||||
});
|
||||
});
|
||||
});
|
||||
it('Has no detectable accessibility issues', () => {
|
||||
cy.get('.tabs a').each(($tab) => {
|
||||
cy.wrap($tab).click({ force: true })
|
||||
cy.injectAxe()
|
||||
cy.checkA11y()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
import { testAdmin } from "../../../test/_globals.js";
|
||||
import { logout, login } from "../../support/index.js";
|
||||
describe("Admin - Lot Type Management", () => {
|
||||
beforeEach("Loads page", () => {
|
||||
import { testAdmin } from '../../../test/_globals.js';
|
||||
import { logout, login } from '../../support/index.js';
|
||||
describe('Admin - Lot Type Management', () => {
|
||||
beforeEach('Loads page', () => {
|
||||
logout();
|
||||
login(testAdmin);
|
||||
cy.visit("/admin/lotTypes");
|
||||
cy.location("pathname").should("equal", "/admin/lotTypes");
|
||||
cy.visit('/admin/lotTypes');
|
||||
cy.location('pathname').should('equal', '/admin/lotTypes');
|
||||
});
|
||||
afterEach(logout);
|
||||
it("Has no detectable accessibility issues", () => {
|
||||
it('Has no detectable accessibility issues', () => {
|
||||
cy.injectAxe();
|
||||
cy.checkA11y();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,22 +1,21 @@
|
|||
/* eslint-disable unicorn/filename-case, promise/catch-or-return, promise/always-return */
|
||||
|
||||
import { testAdmin } from "../../../test/_globals.js";
|
||||
import { testAdmin } from '../../../test/_globals.js'
|
||||
|
||||
import { logout, login } from "../../support/index.js";
|
||||
import { logout, login } from '../../support/index.js'
|
||||
|
||||
describe("Admin - Lot Type Management", () => {
|
||||
describe('Admin - Lot Type Management', () => {
|
||||
beforeEach('Loads page', () => {
|
||||
logout()
|
||||
login(testAdmin)
|
||||
cy.visit('/admin/lotTypes')
|
||||
cy.location('pathname').should('equal', '/admin/lotTypes')
|
||||
})
|
||||
|
||||
beforeEach("Loads page", () => {
|
||||
logout();
|
||||
login(testAdmin);
|
||||
cy.visit("/admin/lotTypes");
|
||||
cy.location("pathname").should("equal", "/admin/lotTypes");
|
||||
});
|
||||
afterEach(logout)
|
||||
|
||||
afterEach(logout);
|
||||
|
||||
it("Has no detectable accessibility issues", () => {
|
||||
cy.injectAxe();
|
||||
cy.checkA11y();
|
||||
});
|
||||
});
|
||||
it('Has no detectable accessibility issues', () => {
|
||||
cy.injectAxe()
|
||||
cy.checkA11y()
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
import { testAdmin } from "../../../test/_globals.js";
|
||||
import { logout, login } from "../../support/index.js";
|
||||
describe("Admin - Occupancy Type Management", () => {
|
||||
beforeEach("Loads page", () => {
|
||||
import { testAdmin } from '../../../test/_globals.js';
|
||||
import { logout, login } from '../../support/index.js';
|
||||
describe('Admin - Occupancy Type Management', () => {
|
||||
beforeEach('Loads page', () => {
|
||||
logout();
|
||||
login(testAdmin);
|
||||
cy.visit("/admin/occupancyTypes");
|
||||
cy.location("pathname").should("equal", "/admin/occupancyTypes");
|
||||
cy.visit('/admin/occupancyTypes');
|
||||
cy.location('pathname').should('equal', '/admin/occupancyTypes');
|
||||
});
|
||||
afterEach(logout);
|
||||
it("Has no detectable accessibility issues", () => {
|
||||
it('Has no detectable accessibility issues', () => {
|
||||
cy.injectAxe();
|
||||
cy.checkA11y();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,22 +1,21 @@
|
|||
/* eslint-disable unicorn/filename-case, promise/catch-or-return, promise/always-return */
|
||||
|
||||
import { testAdmin } from "../../../test/_globals.js";
|
||||
import { testAdmin } from '../../../test/_globals.js'
|
||||
|
||||
import { logout, login } from "../../support/index.js";
|
||||
import { logout, login } from '../../support/index.js'
|
||||
|
||||
describe("Admin - Occupancy Type Management", () => {
|
||||
describe('Admin - Occupancy Type Management', () => {
|
||||
beforeEach('Loads page', () => {
|
||||
logout()
|
||||
login(testAdmin)
|
||||
cy.visit('/admin/occupancyTypes')
|
||||
cy.location('pathname').should('equal', '/admin/occupancyTypes')
|
||||
})
|
||||
|
||||
beforeEach("Loads page", () => {
|
||||
logout();
|
||||
login(testAdmin);
|
||||
cy.visit("/admin/occupancyTypes");
|
||||
cy.location("pathname").should("equal", "/admin/occupancyTypes");
|
||||
});
|
||||
afterEach(logout)
|
||||
|
||||
afterEach(logout);
|
||||
|
||||
it("Has no detectable accessibility issues", () => {
|
||||
cy.injectAxe();
|
||||
cy.checkA11y();
|
||||
});
|
||||
});
|
||||
it('Has no detectable accessibility issues', () => {
|
||||
cy.injectAxe()
|
||||
cy.checkA11y()
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
import { testUpdate } from "../../../test/_globals.js";
|
||||
import { logout, login } from "../../support/index.js";
|
||||
describe("Update - Lot Occupancies", () => {
|
||||
import { testUpdate } from '../../../test/_globals.js';
|
||||
import { logout, login } from '../../support/index.js';
|
||||
describe('Update - Lot Occupancies', () => {
|
||||
beforeEach(() => {
|
||||
logout();
|
||||
login(testUpdate);
|
||||
});
|
||||
afterEach(logout);
|
||||
it('Has a "Create" link on the Lot Occupancy Search', () => {
|
||||
cy.visit("/lotOccupancies");
|
||||
cy.location("pathname").should("equal", "/lotOccupancies");
|
||||
cy.get("a[href$='/lotOccupancies/new']").should("exist");
|
||||
cy.visit('/lotOccupancies');
|
||||
cy.location('pathname').should('equal', '/lotOccupancies');
|
||||
cy.get("a[href$='/lotOccupancies/new']").should('exist');
|
||||
});
|
||||
describe("Update a New Lot Occupancy", () => {
|
||||
it("Has no detectable accessibility issues", () => {
|
||||
cy.visit("/lotOccupancies/new");
|
||||
describe('Update a New Lot Occupancy', () => {
|
||||
it('Has no detectable accessibility issues', () => {
|
||||
cy.visit('/lotOccupancies/new');
|
||||
cy.injectAxe();
|
||||
cy.checkA11y();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,26 +1,26 @@
|
|||
import { testUpdate } from "../../../test/_globals.js";
|
||||
import { testUpdate } from '../../../test/_globals.js'
|
||||
|
||||
import { logout, login } from "../../support/index.js";
|
||||
import { logout, login } from '../../support/index.js'
|
||||
|
||||
describe("Update - Lot Occupancies", () => {
|
||||
describe('Update - Lot Occupancies', () => {
|
||||
beforeEach(() => {
|
||||
logout();
|
||||
login(testUpdate);
|
||||
});
|
||||
logout()
|
||||
login(testUpdate)
|
||||
})
|
||||
|
||||
afterEach(logout);
|
||||
afterEach(logout)
|
||||
|
||||
it('Has a "Create" link on the Lot Occupancy Search', () => {
|
||||
cy.visit("/lotOccupancies");
|
||||
cy.location("pathname").should("equal", "/lotOccupancies");
|
||||
cy.get("a[href$='/lotOccupancies/new']").should("exist");
|
||||
});
|
||||
cy.visit('/lotOccupancies')
|
||||
cy.location('pathname').should('equal', '/lotOccupancies')
|
||||
cy.get("a[href$='/lotOccupancies/new']").should('exist')
|
||||
})
|
||||
|
||||
describe("Update a New Lot Occupancy", () => {
|
||||
it("Has no detectable accessibility issues", () => {
|
||||
cy.visit("/lotOccupancies/new");
|
||||
cy.injectAxe();
|
||||
cy.checkA11y();
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('Update a New Lot Occupancy', () => {
|
||||
it('Has no detectable accessibility issues', () => {
|
||||
cy.visit('/lotOccupancies/new')
|
||||
cy.injectAxe()
|
||||
cy.checkA11y()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
import { testUpdate } from "../../../test/_globals.js";
|
||||
import { logout, login } from "../../support/index.js";
|
||||
describe("Update - Lots", () => {
|
||||
beforeEach("Loads page", () => {
|
||||
import { testUpdate } from '../../../test/_globals.js';
|
||||
import { logout, login } from '../../support/index.js';
|
||||
describe('Update - Lots', () => {
|
||||
beforeEach('Loads page', () => {
|
||||
logout();
|
||||
login(testUpdate);
|
||||
});
|
||||
afterEach(logout);
|
||||
it('Has a "Create" link on the Lot Search', () => {
|
||||
cy.visit("/lots");
|
||||
cy.location("pathname").should("equal", "/lots");
|
||||
cy.get("a[href$='/lots/new']").should("exist");
|
||||
cy.visit('/lots');
|
||||
cy.location('pathname').should('equal', '/lots');
|
||||
cy.get("a[href$='/lots/new']").should('exist');
|
||||
});
|
||||
describe("Update a New Lot", () => {
|
||||
it("Has no detectable accessibility issues", () => {
|
||||
cy.visit("/lots/new");
|
||||
describe('Update a New Lot', () => {
|
||||
it('Has no detectable accessibility issues', () => {
|
||||
cy.visit('/lots/new');
|
||||
cy.injectAxe();
|
||||
cy.checkA11y();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,26 +1,26 @@
|
|||
import { testUpdate } from "../../../test/_globals.js";
|
||||
import { testUpdate } from '../../../test/_globals.js'
|
||||
|
||||
import { logout, login } from "../../support/index.js";
|
||||
import { logout, login } from '../../support/index.js'
|
||||
|
||||
describe("Update - Lots", () => {
|
||||
beforeEach("Loads page", () => {
|
||||
logout();
|
||||
login(testUpdate);
|
||||
});
|
||||
describe('Update - Lots', () => {
|
||||
beforeEach('Loads page', () => {
|
||||
logout()
|
||||
login(testUpdate)
|
||||
})
|
||||
|
||||
afterEach(logout);
|
||||
afterEach(logout)
|
||||
|
||||
it('Has a "Create" link on the Lot Search', () => {
|
||||
cy.visit("/lots");
|
||||
cy.location("pathname").should("equal", "/lots");
|
||||
cy.get("a[href$='/lots/new']").should("exist");
|
||||
});
|
||||
cy.visit('/lots')
|
||||
cy.location('pathname').should('equal', '/lots')
|
||||
cy.get("a[href$='/lots/new']").should('exist')
|
||||
})
|
||||
|
||||
describe("Update a New Lot", () => {
|
||||
it("Has no detectable accessibility issues", () => {
|
||||
cy.visit("/lots/new");
|
||||
cy.injectAxe();
|
||||
cy.checkA11y();
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('Update a New Lot', () => {
|
||||
it('Has no detectable accessibility issues', () => {
|
||||
cy.visit('/lots/new')
|
||||
cy.injectAxe()
|
||||
cy.checkA11y()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,22 +1,22 @@
|
|||
import { testUpdate } from "../../../test/_globals.js";
|
||||
import { logout, login } from "../../support/index.js";
|
||||
describe("Update User", () => {
|
||||
beforeEach("Loads page", () => {
|
||||
import { testUpdate } from '../../../test/_globals.js';
|
||||
import { logout, login } from '../../support/index.js';
|
||||
describe('Update User', () => {
|
||||
beforeEach('Loads page', () => {
|
||||
logout();
|
||||
login(testUpdate);
|
||||
});
|
||||
afterEach(logout);
|
||||
it("Has an Update User dashboard", () => {
|
||||
cy.visit("/dashboard");
|
||||
cy.log("Has no detectable accessibility issues");
|
||||
it('Has an Update User dashboard', () => {
|
||||
cy.visit('/dashboard');
|
||||
cy.log('Has no detectable accessibility issues');
|
||||
cy.injectAxe();
|
||||
cy.checkA11y();
|
||||
cy.log("Has no links to admin areas");
|
||||
cy.get("a[href*='/admin']").should("not.exist");
|
||||
cy.log('Has no links to admin areas');
|
||||
cy.get("a[href*='/admin']").should('not.exist');
|
||||
});
|
||||
it("Redirects to Dashboard when attempting to access admin area", () => {
|
||||
cy.visit("/admin/cleanup");
|
||||
it('Redirects to Dashboard when attempting to access admin area', () => {
|
||||
cy.visit('/admin/cleanup');
|
||||
cy.wait(200);
|
||||
cy.location("pathname").should("equal", "/dashboard/");
|
||||
cy.location('pathname').should('equal', '/dashboard/');
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,31 +1,31 @@
|
|||
import { testUpdate } from "../../../test/_globals.js";
|
||||
import { testUpdate } from '../../../test/_globals.js'
|
||||
|
||||
import { logout, login } from "../../support/index.js";
|
||||
import { logout, login } from '../../support/index.js'
|
||||
|
||||
describe("Update User", () => {
|
||||
beforeEach("Loads page", () => {
|
||||
logout();
|
||||
login(testUpdate);
|
||||
});
|
||||
describe('Update User', () => {
|
||||
beforeEach('Loads page', () => {
|
||||
logout()
|
||||
login(testUpdate)
|
||||
})
|
||||
|
||||
afterEach(logout);
|
||||
afterEach(logout)
|
||||
|
||||
it("Has an Update User dashboard", () => {
|
||||
cy.visit("/dashboard");
|
||||
it('Has an Update User dashboard', () => {
|
||||
cy.visit('/dashboard')
|
||||
|
||||
cy.log("Has no detectable accessibility issues");
|
||||
cy.log('Has no detectable accessibility issues')
|
||||
|
||||
cy.injectAxe();
|
||||
cy.checkA11y();
|
||||
cy.injectAxe()
|
||||
cy.checkA11y()
|
||||
|
||||
cy.log("Has no links to admin areas");
|
||||
cy.log('Has no links to admin areas')
|
||||
|
||||
cy.get("a[href*='/admin']").should("not.exist");
|
||||
});
|
||||
cy.get("a[href*='/admin']").should('not.exist')
|
||||
})
|
||||
|
||||
it("Redirects to Dashboard when attempting to access admin area", () => {
|
||||
cy.visit("/admin/cleanup");
|
||||
cy.wait(200);
|
||||
cy.location("pathname").should("equal", "/dashboard/");
|
||||
});
|
||||
});
|
||||
it('Redirects to Dashboard when attempting to access admin area', () => {
|
||||
cy.visit('/admin/cleanup')
|
||||
cy.wait(200)
|
||||
cy.location('pathname').should('equal', '/dashboard/')
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,45 +1,45 @@
|
|||
import { testView } from "../../../test/_globals.js";
|
||||
import { logout, login } from "../../support/index.js";
|
||||
describe("Read Only User", () => {
|
||||
import { testView } from '../../../test/_globals.js';
|
||||
import { logout, login } from '../../support/index.js';
|
||||
describe('Read Only User', () => {
|
||||
beforeEach(() => {
|
||||
logout();
|
||||
login(testView);
|
||||
});
|
||||
afterEach(logout);
|
||||
it("Has a Read Only User dashboard", () => {
|
||||
cy.visit("/dashboard");
|
||||
cy.log("Has no detectable accessibility issues");
|
||||
it('Has a Read Only User dashboard', () => {
|
||||
cy.visit('/dashboard');
|
||||
cy.log('Has no detectable accessibility issues');
|
||||
cy.injectAxe();
|
||||
cy.checkA11y();
|
||||
cy.log("Has no links to new areas");
|
||||
cy.get("a[href*='/new']").should("not.exist");
|
||||
cy.log("Has no links to admin areas");
|
||||
cy.get("a[href*='/admin']").should("not.exist");
|
||||
cy.log('Has no links to new areas');
|
||||
cy.get("a[href*='/new']").should('not.exist');
|
||||
cy.log('Has no links to admin areas');
|
||||
cy.get("a[href*='/admin']").should('not.exist');
|
||||
});
|
||||
it("Has no link to create maps on Map Search", () => {
|
||||
cy.visit("/maps");
|
||||
cy.get("a[href*='/new']").should("not.exist");
|
||||
it('Has no link to create maps on Map Search', () => {
|
||||
cy.visit('/maps');
|
||||
cy.get("a[href*='/new']").should('not.exist');
|
||||
});
|
||||
it("Has no link to create lots on Lot Search", () => {
|
||||
cy.visit("/lots");
|
||||
cy.get("a[href*='/new']").should("not.exist");
|
||||
it('Has no link to create lots on Lot Search', () => {
|
||||
cy.visit('/lots');
|
||||
cy.get("a[href*='/new']").should('not.exist');
|
||||
});
|
||||
it("Has no link to create occupancies on Occupancy Search", () => {
|
||||
cy.visit("/lotOccupancies");
|
||||
cy.get("a[href*='/new']").should("not.exist");
|
||||
it('Has no link to create occupancies on Occupancy Search', () => {
|
||||
cy.visit('/lotOccupancies');
|
||||
cy.get("a[href*='/new']").should('not.exist');
|
||||
});
|
||||
it("Has no link to create work orders on Work Order Search", () => {
|
||||
cy.visit("/workOrders");
|
||||
cy.get("a[href*='/new']").should("not.exist");
|
||||
it('Has no link to create work orders on Work Order Search', () => {
|
||||
cy.visit('/workOrders');
|
||||
cy.get("a[href*='/new']").should('not.exist');
|
||||
});
|
||||
it("Redirects to Dashboard when attempting to create a work order", () => {
|
||||
cy.visit("/workOrders/new");
|
||||
it('Redirects to Dashboard when attempting to create a work order', () => {
|
||||
cy.visit('/workOrders/new');
|
||||
cy.wait(200);
|
||||
cy.location("pathname").should("equal", "/dashboard/");
|
||||
cy.location('pathname').should('equal', '/dashboard/');
|
||||
});
|
||||
it("Redirects to Dashboard when attempting to alter fees", () => {
|
||||
cy.visit("/admin/fees");
|
||||
it('Redirects to Dashboard when attempting to alter fees', () => {
|
||||
cy.visit('/admin/fees');
|
||||
cy.wait(200);
|
||||
cy.location("pathname").should("not.contain", "/admin");
|
||||
cy.location('pathname').should('not.contain', '/admin');
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,62 +1,60 @@
|
|||
import { testView } from "../../../test/_globals.js";
|
||||
import { testView } from '../../../test/_globals.js'
|
||||
|
||||
import { logout, login } from "../../support/index.js";
|
||||
|
||||
describe("Read Only User", () => {
|
||||
import { logout, login } from '../../support/index.js'
|
||||
|
||||
describe('Read Only User', () => {
|
||||
beforeEach(() => {
|
||||
logout();
|
||||
login(testView);
|
||||
});
|
||||
logout()
|
||||
login(testView)
|
||||
})
|
||||
|
||||
afterEach(logout);
|
||||
afterEach(logout)
|
||||
|
||||
it("Has a Read Only User dashboard", () => {
|
||||
cy.visit("/dashboard");
|
||||
it('Has a Read Only User dashboard', () => {
|
||||
cy.visit('/dashboard')
|
||||
|
||||
cy.log("Has no detectable accessibility issues");
|
||||
cy.injectAxe();
|
||||
cy.checkA11y();
|
||||
cy.log('Has no detectable accessibility issues')
|
||||
cy.injectAxe()
|
||||
cy.checkA11y()
|
||||
|
||||
cy.log('Has no links to new areas')
|
||||
|
||||
cy.log("Has no links to new areas");
|
||||
cy.get("a[href*='/new']").should('not.exist')
|
||||
|
||||
cy.get("a[href*='/new']").should("not.exist");
|
||||
cy.log('Has no links to admin areas')
|
||||
|
||||
cy.log("Has no links to admin areas");
|
||||
cy.get("a[href*='/admin']").should('not.exist')
|
||||
})
|
||||
|
||||
cy.get("a[href*='/admin']").should("not.exist");
|
||||
});
|
||||
it('Has no link to create maps on Map Search', () => {
|
||||
cy.visit('/maps')
|
||||
cy.get("a[href*='/new']").should('not.exist')
|
||||
})
|
||||
|
||||
it("Has no link to create maps on Map Search", () => {
|
||||
cy.visit("/maps");
|
||||
cy.get("a[href*='/new']").should("not.exist");
|
||||
});
|
||||
it('Has no link to create lots on Lot Search', () => {
|
||||
cy.visit('/lots')
|
||||
cy.get("a[href*='/new']").should('not.exist')
|
||||
})
|
||||
|
||||
it("Has no link to create lots on Lot Search", () => {
|
||||
cy.visit("/lots");
|
||||
cy.get("a[href*='/new']").should("not.exist");
|
||||
});
|
||||
it('Has no link to create occupancies on Occupancy Search', () => {
|
||||
cy.visit('/lotOccupancies')
|
||||
cy.get("a[href*='/new']").should('not.exist')
|
||||
})
|
||||
|
||||
it("Has no link to create occupancies on Occupancy Search", () => {
|
||||
cy.visit("/lotOccupancies");
|
||||
cy.get("a[href*='/new']").should("not.exist");
|
||||
});
|
||||
it('Has no link to create work orders on Work Order Search', () => {
|
||||
cy.visit('/workOrders')
|
||||
cy.get("a[href*='/new']").should('not.exist')
|
||||
})
|
||||
|
||||
it("Has no link to create work orders on Work Order Search", () => {
|
||||
cy.visit("/workOrders");
|
||||
cy.get("a[href*='/new']").should("not.exist");
|
||||
});
|
||||
it('Redirects to Dashboard when attempting to create a work order', () => {
|
||||
cy.visit('/workOrders/new')
|
||||
cy.wait(200)
|
||||
cy.location('pathname').should('equal', '/dashboard/')
|
||||
})
|
||||
|
||||
it("Redirects to Dashboard when attempting to create a work order", () => {
|
||||
cy.visit("/workOrders/new");
|
||||
cy.wait(200);
|
||||
cy.location("pathname").should("equal", "/dashboard/");
|
||||
});
|
||||
|
||||
it("Redirects to Dashboard when attempting to alter fees", () => {
|
||||
cy.visit("/admin/fees");
|
||||
cy.wait(200);
|
||||
cy.location("pathname").should("not.contain", "/admin");
|
||||
});
|
||||
});
|
||||
it('Redirects to Dashboard when attempting to alter fees', () => {
|
||||
cy.visit('/admin/fees')
|
||||
cy.wait(200)
|
||||
cy.location('pathname').should('not.contain', '/admin')
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,27 +1,27 @@
|
|||
import { logout } from "../../support/index.js";
|
||||
describe("Login Page", () => {
|
||||
import { logout } from '../../support/index.js';
|
||||
describe('Login Page', () => {
|
||||
beforeEach(logout);
|
||||
it("Has no detectable accessibility issues", () => {
|
||||
it('Has no detectable accessibility issues', () => {
|
||||
cy.injectAxe();
|
||||
cy.checkA11y();
|
||||
});
|
||||
it("Contains a login form", () => {
|
||||
cy.get("form").should("have.length", 1);
|
||||
it('Contains a login form', () => {
|
||||
cy.get('form').should('have.length', 1);
|
||||
});
|
||||
it("Contains a _csrf field", () => {
|
||||
cy.get("form [name='_csrf']").should("exist");
|
||||
it('Contains a _csrf field', () => {
|
||||
cy.get("form [name='_csrf']").should('exist');
|
||||
});
|
||||
it("Contains a userName field", () => {
|
||||
cy.get("form [name='userName']").should("exist");
|
||||
it('Contains a userName field', () => {
|
||||
cy.get("form [name='userName']").should('exist');
|
||||
});
|
||||
it("Contains a password field", () => {
|
||||
it('Contains a password field', () => {
|
||||
cy.get("form [name='password']")
|
||||
.should("have.length", 1)
|
||||
.invoke("attr", "type")
|
||||
.should("equal", "password");
|
||||
.should('have.length', 1)
|
||||
.invoke('attr', 'type')
|
||||
.should('equal', 'password');
|
||||
});
|
||||
it("Contains a help link", () => {
|
||||
cy.get("a").contains("help", {
|
||||
it('Contains a help link', () => {
|
||||
cy.get('a').contains('help', {
|
||||
matchCase: false
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,35 +1,35 @@
|
|||
import { logout } from "../../support/index.js";
|
||||
import { logout } from '../../support/index.js'
|
||||
|
||||
describe("Login Page", () => {
|
||||
beforeEach(logout);
|
||||
describe('Login Page', () => {
|
||||
beforeEach(logout)
|
||||
|
||||
it("Has no detectable accessibility issues", () => {
|
||||
cy.injectAxe();
|
||||
cy.checkA11y();
|
||||
});
|
||||
it('Has no detectable accessibility issues', () => {
|
||||
cy.injectAxe()
|
||||
cy.checkA11y()
|
||||
})
|
||||
|
||||
it("Contains a login form", () => {
|
||||
cy.get("form").should("have.length", 1);
|
||||
});
|
||||
it('Contains a login form', () => {
|
||||
cy.get('form').should('have.length', 1)
|
||||
})
|
||||
|
||||
it("Contains a _csrf field", () => {
|
||||
cy.get("form [name='_csrf']").should("exist");
|
||||
});
|
||||
it('Contains a _csrf field', () => {
|
||||
cy.get("form [name='_csrf']").should('exist')
|
||||
})
|
||||
|
||||
it("Contains a userName field", () => {
|
||||
cy.get("form [name='userName']").should("exist");
|
||||
});
|
||||
it('Contains a userName field', () => {
|
||||
cy.get("form [name='userName']").should('exist')
|
||||
})
|
||||
|
||||
it("Contains a password field", () => {
|
||||
it('Contains a password field', () => {
|
||||
cy.get("form [name='password']")
|
||||
.should("have.length", 1)
|
||||
.invoke("attr", "type")
|
||||
.should("equal", "password");
|
||||
});
|
||||
.should('have.length', 1)
|
||||
.invoke('attr', 'type')
|
||||
.should('equal', 'password')
|
||||
})
|
||||
|
||||
it("Contains a help link", () => {
|
||||
cy.get("a").contains("help", {
|
||||
it('Contains a help link', () => {
|
||||
cy.get('a').contains('help', {
|
||||
matchCase: false
|
||||
});
|
||||
});
|
||||
});
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import "cypress-axe";
|
||||
import 'cypress-axe';
|
||||
export declare const logout: () => void;
|
||||
export declare const login: (userName: string) => void;
|
||||
export declare const ajaxDelayMillis = 800;
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
import "cypress-axe";
|
||||
import 'cypress-axe';
|
||||
export const logout = () => {
|
||||
cy.visit("/logout");
|
||||
cy.visit('/logout');
|
||||
};
|
||||
export const login = (userName) => {
|
||||
cy.visit("/login");
|
||||
cy.get(".message").contains("Testing", {
|
||||
cy.visit('/login');
|
||||
cy.get('.message').contains('Testing', {
|
||||
matchCase: false
|
||||
});
|
||||
cy.get("form [name='userName']").type(userName);
|
||||
cy.get("form [name='password']").type(userName);
|
||||
cy.get("form").submit();
|
||||
cy.location("pathname").should("not.contain", "/login");
|
||||
cy.get(".navbar").should("have.length", 1);
|
||||
cy.get('form').submit();
|
||||
cy.location('pathname').should('not.contain', '/login');
|
||||
cy.get('.navbar').should('have.length', 1);
|
||||
};
|
||||
export const ajaxDelayMillis = 800;
|
||||
|
|
|
|||
|
|
@ -1,27 +1,27 @@
|
|||
/* eslint-disable node/no-unpublished-import */
|
||||
|
||||
import "cypress-axe";
|
||||
import 'cypress-axe'
|
||||
|
||||
export const logout = (): void => {
|
||||
cy.visit("/logout");
|
||||
};
|
||||
cy.visit('/logout')
|
||||
}
|
||||
|
||||
export const login = (userName: string): void => {
|
||||
cy.visit("/login");
|
||||
cy.visit('/login')
|
||||
|
||||
cy.get(".message").contains("Testing", {
|
||||
cy.get('.message').contains('Testing', {
|
||||
matchCase: false
|
||||
});
|
||||
})
|
||||
|
||||
cy.get("form [name='userName']").type(userName);
|
||||
cy.get("form [name='password']").type(userName);
|
||||
cy.get("form [name='userName']").type(userName)
|
||||
cy.get("form [name='password']").type(userName)
|
||||
|
||||
cy.get("form").submit();
|
||||
cy.get('form').submit()
|
||||
|
||||
cy.location("pathname").should("not.contain", "/login");
|
||||
cy.location('pathname').should('not.contain', '/login')
|
||||
|
||||
// Logged in pages have a navbar
|
||||
cy.get(".navbar").should("have.length", 1);
|
||||
};
|
||||
cy.get('.navbar').should('have.length', 1)
|
||||
}
|
||||
|
||||
export const ajaxDelayMillis = 800;
|
||||
export const ajaxDelayMillis = 800
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
{
|
||||
"ignore": ["cypress/*", "data/sessions/*", "public/javascripts/*", "public-typescript/*"]
|
||||
"ignore": [
|
||||
"cypress/*",
|
||||
"data/sessions/*",
|
||||
"public/javascripts/*",
|
||||
"public-typescript/*"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
246
routes/admin.js
246
routes/admin.js
|
|
@ -1,125 +1,125 @@
|
|||
import { Router } from "express";
|
||||
import handler_fees from "../handlers/admin-get/fees.js";
|
||||
import handler_doAddFeeCategory from "../handlers/admin-post/doAddFeeCategory.js";
|
||||
import handler_doUpdateFeeCategory from "../handlers/admin-post/doUpdateFeeCategory.js";
|
||||
import handler_doMoveFeeCategoryUp from "../handlers/admin-post/doMoveFeeCategoryUp.js";
|
||||
import handler_doMoveFeeCategoryDown from "../handlers/admin-post/doMoveFeeCategoryDown.js";
|
||||
import handler_doDeleteFeeCategory from "../handlers/admin-post/doDeleteFeeCategory.js";
|
||||
import handler_doAddFee from "../handlers/admin-post/doAddFee.js";
|
||||
import handler_doUpdateFee from "../handlers/admin-post/doUpdateFee.js";
|
||||
import handler_doMoveFeeUp from "../handlers/admin-post/doMoveFeeUp.js";
|
||||
import handler_doMoveFeeDown from "../handlers/admin-post/doMoveFeeDown.js";
|
||||
import handler_doDeleteFee from "../handlers/admin-post/doDeleteFee.js";
|
||||
import handler_occupancyTypes from "../handlers/admin-get/occupancyTypes.js";
|
||||
import handler_doAddOccupancyType from "../handlers/admin-post/doAddOccupancyType.js";
|
||||
import handler_doUpdateOccupancyType from "../handlers/admin-post/doUpdateOccupancyType.js";
|
||||
import handler_doMoveOccupancyTypeUp from "../handlers/admin-post/doMoveOccupancyTypeUp.js";
|
||||
import handler_doMoveOccupancyTypeDown from "../handlers/admin-post/doMoveOccupancyTypeDown.js";
|
||||
import handler_doDeleteOccupancyType from "../handlers/admin-post/doDeleteOccupancyType.js";
|
||||
import handler_doAddOccupancyTypeField from "../handlers/admin-post/doAddOccupancyTypeField.js";
|
||||
import handler_doUpdateOccupancyTypeField from "../handlers/admin-post/doUpdateOccupancyTypeField.js";
|
||||
import handler_doMoveOccupancyTypeFieldUp from "../handlers/admin-post/doMoveOccupancyTypeFieldUp.js";
|
||||
import handler_doMoveOccupancyTypeFieldDown from "../handlers/admin-post/doMoveOccupancyTypeFieldDown.js";
|
||||
import handler_doDeleteOccupancyTypeField from "../handlers/admin-post/doDeleteOccupancyTypeField.js";
|
||||
import handler_doAddOccupancyTypePrint from "../handlers/admin-post/doAddOccupancyTypePrint.js";
|
||||
import handler_doMoveOccupancyTypePrintUp from "../handlers/admin-post/doMoveOccupancyTypePrintUp.js";
|
||||
import handler_doMoveOccupancyTypePrintDown from "../handlers/admin-post/doMoveOccupancyTypePrintDown.js";
|
||||
import handler_doDeleteOccupancyTypePrint from "../handlers/admin-post/doDeleteOccupancyTypePrint.js";
|
||||
import handler_lotTypes from "../handlers/admin-get/lotTypes.js";
|
||||
import handler_doAddLotType from "../handlers/admin-post/doAddLotType.js";
|
||||
import handler_doUpdateLotType from "../handlers/admin-post/doUpdateLotType.js";
|
||||
import handler_doMoveLotTypeUp from "../handlers/admin-post/doMoveLotTypeUp.js";
|
||||
import handler_doMoveLotTypeDown from "../handlers/admin-post/doMoveLotTypeDown.js";
|
||||
import handler_doDeleteLotType from "../handlers/admin-post/doDeleteLotType.js";
|
||||
import handler_doAddLotTypeField from "../handlers/admin-post/doAddLotTypeField.js";
|
||||
import handler_doUpdateLotTypeField from "../handlers/admin-post/doUpdateLotTypeField.js";
|
||||
import handler_doMoveLotTypeFieldUp from "../handlers/admin-post/doMoveLotTypeFieldUp.js";
|
||||
import handler_doMoveLotTypeFieldDown from "../handlers/admin-post/doMoveLotTypeFieldDown.js";
|
||||
import handler_doDeleteLotTypeField from "../handlers/admin-post/doDeleteLotTypeField.js";
|
||||
import handler_tables from "../handlers/admin-get/tables.js";
|
||||
import handler_doAddWorkOrderType from "../handlers/admin-post/doAddWorkOrderType.js";
|
||||
import handler_doUpdateWorkOrderType from "../handlers/admin-post/doUpdateWorkOrderType.js";
|
||||
import handler_doMoveWorkOrderTypeUp from "../handlers/admin-post/doMoveWorkOrderTypeUp.js";
|
||||
import handler_doMoveWorkOrderTypeDown from "../handlers/admin-post/doMoveWorkOrderTypeDown.js";
|
||||
import handler_doDeleteWorkOrderType from "../handlers/admin-post/doDeleteWorkOrderType.js";
|
||||
import handler_doAddWorkOrderMilestoneType from "../handlers/admin-post/doAddWorkOrderMilestoneType.js";
|
||||
import handler_doUpdateWorkOrderMilestoneType from "../handlers/admin-post/doUpdateWorkOrderMilestoneType.js";
|
||||
import handler_doMoveWorkOrderMilestoneTypeUp from "../handlers/admin-post/doMoveWorkOrderMilestoneTypeUp.js";
|
||||
import handler_doMoveWorkOrderMilestoneTypeDown from "../handlers/admin-post/doMoveWorkOrderMilestoneTypeDown.js";
|
||||
import handler_doDeleteWorkOrderMilestoneType from "../handlers/admin-post/doDeleteWorkOrderMilestoneType.js";
|
||||
import handler_doAddLotStatus from "../handlers/admin-post/doAddLotStatus.js";
|
||||
import handler_doUpdateLotStatus from "../handlers/admin-post/doUpdateLotStatus.js";
|
||||
import handler_doMoveLotStatusUp from "../handlers/admin-post/doMoveLotStatusUp.js";
|
||||
import handler_doMoveLotStatusDown from "../handlers/admin-post/doMoveLotStatusDown.js";
|
||||
import handler_doDeleteLotStatus from "../handlers/admin-post/doDeleteLotStatus.js";
|
||||
import handler_doAddLotOccupantType from "../handlers/admin-post/doAddLotOccupantType.js";
|
||||
import handler_doUpdateLotOccupantType from "../handlers/admin-post/doUpdateLotOccupantType.js";
|
||||
import handler_doMoveLotOccupantTypeUp from "../handlers/admin-post/doMoveLotOccupantTypeUp.js";
|
||||
import handler_doMoveLotOccupantTypeDown from "../handlers/admin-post/doMoveLotOccupantTypeDown.js";
|
||||
import handler_doDeleteLotOccupantType from "../handlers/admin-post/doDeleteLotOccupantType.js";
|
||||
import handler_cleanup from "../handlers/admin-get/cleanup.js";
|
||||
import handler_doCleanupDatabase from "../handlers/admin-post/doCleanupDatabase.js";
|
||||
import handler_ntfyStartup from "../handlers/admin-get/ntfyStartup.js";
|
||||
import { Router } from 'express';
|
||||
import handler_fees from '../handlers/admin-get/fees.js';
|
||||
import handler_doAddFeeCategory from '../handlers/admin-post/doAddFeeCategory.js';
|
||||
import handler_doUpdateFeeCategory from '../handlers/admin-post/doUpdateFeeCategory.js';
|
||||
import handler_doMoveFeeCategoryUp from '../handlers/admin-post/doMoveFeeCategoryUp.js';
|
||||
import handler_doMoveFeeCategoryDown from '../handlers/admin-post/doMoveFeeCategoryDown.js';
|
||||
import handler_doDeleteFeeCategory from '../handlers/admin-post/doDeleteFeeCategory.js';
|
||||
import handler_doAddFee from '../handlers/admin-post/doAddFee.js';
|
||||
import handler_doUpdateFee from '../handlers/admin-post/doUpdateFee.js';
|
||||
import handler_doMoveFeeUp from '../handlers/admin-post/doMoveFeeUp.js';
|
||||
import handler_doMoveFeeDown from '../handlers/admin-post/doMoveFeeDown.js';
|
||||
import handler_doDeleteFee from '../handlers/admin-post/doDeleteFee.js';
|
||||
import handler_occupancyTypes from '../handlers/admin-get/occupancyTypes.js';
|
||||
import handler_doAddOccupancyType from '../handlers/admin-post/doAddOccupancyType.js';
|
||||
import handler_doUpdateOccupancyType from '../handlers/admin-post/doUpdateOccupancyType.js';
|
||||
import handler_doMoveOccupancyTypeUp from '../handlers/admin-post/doMoveOccupancyTypeUp.js';
|
||||
import handler_doMoveOccupancyTypeDown from '../handlers/admin-post/doMoveOccupancyTypeDown.js';
|
||||
import handler_doDeleteOccupancyType from '../handlers/admin-post/doDeleteOccupancyType.js';
|
||||
import handler_doAddOccupancyTypeField from '../handlers/admin-post/doAddOccupancyTypeField.js';
|
||||
import handler_doUpdateOccupancyTypeField from '../handlers/admin-post/doUpdateOccupancyTypeField.js';
|
||||
import handler_doMoveOccupancyTypeFieldUp from '../handlers/admin-post/doMoveOccupancyTypeFieldUp.js';
|
||||
import handler_doMoveOccupancyTypeFieldDown from '../handlers/admin-post/doMoveOccupancyTypeFieldDown.js';
|
||||
import handler_doDeleteOccupancyTypeField from '../handlers/admin-post/doDeleteOccupancyTypeField.js';
|
||||
import handler_doAddOccupancyTypePrint from '../handlers/admin-post/doAddOccupancyTypePrint.js';
|
||||
import handler_doMoveOccupancyTypePrintUp from '../handlers/admin-post/doMoveOccupancyTypePrintUp.js';
|
||||
import handler_doMoveOccupancyTypePrintDown from '../handlers/admin-post/doMoveOccupancyTypePrintDown.js';
|
||||
import handler_doDeleteOccupancyTypePrint from '../handlers/admin-post/doDeleteOccupancyTypePrint.js';
|
||||
import handler_lotTypes from '../handlers/admin-get/lotTypes.js';
|
||||
import handler_doAddLotType from '../handlers/admin-post/doAddLotType.js';
|
||||
import handler_doUpdateLotType from '../handlers/admin-post/doUpdateLotType.js';
|
||||
import handler_doMoveLotTypeUp from '../handlers/admin-post/doMoveLotTypeUp.js';
|
||||
import handler_doMoveLotTypeDown from '../handlers/admin-post/doMoveLotTypeDown.js';
|
||||
import handler_doDeleteLotType from '../handlers/admin-post/doDeleteLotType.js';
|
||||
import handler_doAddLotTypeField from '../handlers/admin-post/doAddLotTypeField.js';
|
||||
import handler_doUpdateLotTypeField from '../handlers/admin-post/doUpdateLotTypeField.js';
|
||||
import handler_doMoveLotTypeFieldUp from '../handlers/admin-post/doMoveLotTypeFieldUp.js';
|
||||
import handler_doMoveLotTypeFieldDown from '../handlers/admin-post/doMoveLotTypeFieldDown.js';
|
||||
import handler_doDeleteLotTypeField from '../handlers/admin-post/doDeleteLotTypeField.js';
|
||||
import handler_tables from '../handlers/admin-get/tables.js';
|
||||
import handler_doAddWorkOrderType from '../handlers/admin-post/doAddWorkOrderType.js';
|
||||
import handler_doUpdateWorkOrderType from '../handlers/admin-post/doUpdateWorkOrderType.js';
|
||||
import handler_doMoveWorkOrderTypeUp from '../handlers/admin-post/doMoveWorkOrderTypeUp.js';
|
||||
import handler_doMoveWorkOrderTypeDown from '../handlers/admin-post/doMoveWorkOrderTypeDown.js';
|
||||
import handler_doDeleteWorkOrderType from '../handlers/admin-post/doDeleteWorkOrderType.js';
|
||||
import handler_doAddWorkOrderMilestoneType from '../handlers/admin-post/doAddWorkOrderMilestoneType.js';
|
||||
import handler_doUpdateWorkOrderMilestoneType from '../handlers/admin-post/doUpdateWorkOrderMilestoneType.js';
|
||||
import handler_doMoveWorkOrderMilestoneTypeUp from '../handlers/admin-post/doMoveWorkOrderMilestoneTypeUp.js';
|
||||
import handler_doMoveWorkOrderMilestoneTypeDown from '../handlers/admin-post/doMoveWorkOrderMilestoneTypeDown.js';
|
||||
import handler_doDeleteWorkOrderMilestoneType from '../handlers/admin-post/doDeleteWorkOrderMilestoneType.js';
|
||||
import handler_doAddLotStatus from '../handlers/admin-post/doAddLotStatus.js';
|
||||
import handler_doUpdateLotStatus from '../handlers/admin-post/doUpdateLotStatus.js';
|
||||
import handler_doMoveLotStatusUp from '../handlers/admin-post/doMoveLotStatusUp.js';
|
||||
import handler_doMoveLotStatusDown from '../handlers/admin-post/doMoveLotStatusDown.js';
|
||||
import handler_doDeleteLotStatus from '../handlers/admin-post/doDeleteLotStatus.js';
|
||||
import handler_doAddLotOccupantType from '../handlers/admin-post/doAddLotOccupantType.js';
|
||||
import handler_doUpdateLotOccupantType from '../handlers/admin-post/doUpdateLotOccupantType.js';
|
||||
import handler_doMoveLotOccupantTypeUp from '../handlers/admin-post/doMoveLotOccupantTypeUp.js';
|
||||
import handler_doMoveLotOccupantTypeDown from '../handlers/admin-post/doMoveLotOccupantTypeDown.js';
|
||||
import handler_doDeleteLotOccupantType from '../handlers/admin-post/doDeleteLotOccupantType.js';
|
||||
import handler_cleanup from '../handlers/admin-get/cleanup.js';
|
||||
import handler_doCleanupDatabase from '../handlers/admin-post/doCleanupDatabase.js';
|
||||
import handler_ntfyStartup from '../handlers/admin-get/ntfyStartup.js';
|
||||
export const router = Router();
|
||||
router.get("/fees", handler_fees);
|
||||
router.post("/doAddFeeCategory", handler_doAddFeeCategory);
|
||||
router.post("/doUpdateFeeCategory", handler_doUpdateFeeCategory);
|
||||
router.post("/doMoveFeeCategoryUp", handler_doMoveFeeCategoryUp);
|
||||
router.post("/doMoveFeeCategoryDown", handler_doMoveFeeCategoryDown);
|
||||
router.post("/doDeleteFeeCategory", handler_doDeleteFeeCategory);
|
||||
router.post("/doAddFee", handler_doAddFee);
|
||||
router.post("/doUpdateFee", handler_doUpdateFee);
|
||||
router.post("/doMoveFeeUp", handler_doMoveFeeUp);
|
||||
router.post("/doMoveFeeDown", handler_doMoveFeeDown);
|
||||
router.post("/doDeleteFee", handler_doDeleteFee);
|
||||
router.get("/occupancyTypes", handler_occupancyTypes);
|
||||
router.post("/doAddOccupancyType", handler_doAddOccupancyType);
|
||||
router.post("/doUpdateOccupancyType", handler_doUpdateOccupancyType);
|
||||
router.post("/doMoveOccupancyTypeUp", handler_doMoveOccupancyTypeUp);
|
||||
router.post("/doMoveOccupancyTypeDown", handler_doMoveOccupancyTypeDown);
|
||||
router.post("/doDeleteOccupancyType", handler_doDeleteOccupancyType);
|
||||
router.post("/doAddOccupancyTypeField", handler_doAddOccupancyTypeField);
|
||||
router.post("/doUpdateOccupancyTypeField", handler_doUpdateOccupancyTypeField);
|
||||
router.post("/doMoveOccupancyTypeFieldUp", handler_doMoveOccupancyTypeFieldUp);
|
||||
router.post("/doMoveOccupancyTypeFieldDown", handler_doMoveOccupancyTypeFieldDown);
|
||||
router.post("/doDeleteOccupancyTypeField", handler_doDeleteOccupancyTypeField);
|
||||
router.post("/doAddOccupancyTypePrint", handler_doAddOccupancyTypePrint);
|
||||
router.post("/doMoveOccupancyTypePrintUp", handler_doMoveOccupancyTypePrintUp);
|
||||
router.post("/doMoveOccupancyTypePrintDown", handler_doMoveOccupancyTypePrintDown);
|
||||
router.post("/doDeleteOccupancyTypePrint", handler_doDeleteOccupancyTypePrint);
|
||||
router.get("/lotTypes", handler_lotTypes);
|
||||
router.post("/doAddLotType", handler_doAddLotType);
|
||||
router.post("/doUpdateLotType", handler_doUpdateLotType);
|
||||
router.post("/doMoveLotTypeUp", handler_doMoveLotTypeUp);
|
||||
router.post("/doMoveLotTypeDown", handler_doMoveLotTypeDown);
|
||||
router.post("/doDeleteLotType", handler_doDeleteLotType);
|
||||
router.post("/doAddLotTypeField", handler_doAddLotTypeField);
|
||||
router.post("/doUpdateLotTypeField", handler_doUpdateLotTypeField);
|
||||
router.post("/doMoveLotTypeFieldUp", handler_doMoveLotTypeFieldUp);
|
||||
router.post("/doMoveLotTypeFieldDown", handler_doMoveLotTypeFieldDown);
|
||||
router.post("/doDeleteLotTypeField", handler_doDeleteLotTypeField);
|
||||
router.get("/tables", handler_tables);
|
||||
router.post("/doAddWorkOrderType", handler_doAddWorkOrderType);
|
||||
router.post("/doUpdateWorkOrderType", handler_doUpdateWorkOrderType);
|
||||
router.post("/doMoveWorkOrderTypeUp", handler_doMoveWorkOrderTypeUp);
|
||||
router.post("/doMoveWorkOrderTypeDown", handler_doMoveWorkOrderTypeDown);
|
||||
router.post("/doDeleteWorkOrderType", handler_doDeleteWorkOrderType);
|
||||
router.post("/doAddWorkOrderMilestoneType", handler_doAddWorkOrderMilestoneType);
|
||||
router.post("/doUpdateWorkOrderMilestoneType", handler_doUpdateWorkOrderMilestoneType);
|
||||
router.post("/doMoveWorkOrderMilestoneTypeUp", handler_doMoveWorkOrderMilestoneTypeUp);
|
||||
router.post("/doMoveWorkOrderMilestoneTypeDown", handler_doMoveWorkOrderMilestoneTypeDown);
|
||||
router.post("/doDeleteWorkOrderMilestoneType", handler_doDeleteWorkOrderMilestoneType);
|
||||
router.post("/doAddLotStatus", handler_doAddLotStatus);
|
||||
router.post("/doUpdateLotStatus", handler_doUpdateLotStatus);
|
||||
router.post("/doMoveLotStatusUp", handler_doMoveLotStatusUp);
|
||||
router.post("/doMoveLotStatusDown", handler_doMoveLotStatusDown);
|
||||
router.post("/doDeleteLotStatus", handler_doDeleteLotStatus);
|
||||
router.post("/doAddLotOccupantType", handler_doAddLotOccupantType);
|
||||
router.post("/doUpdateLotOccupantType", handler_doUpdateLotOccupantType);
|
||||
router.post("/doMoveLotOccupantTypeUp", handler_doMoveLotOccupantTypeUp);
|
||||
router.post("/doMoveLotOccupantTypeDown", handler_doMoveLotOccupantTypeDown);
|
||||
router.post("/doDeleteLotOccupantType", handler_doDeleteLotOccupantType);
|
||||
router.get("/cleanup", handler_cleanup);
|
||||
router.post("/doCleanupDatabase", handler_doCleanupDatabase);
|
||||
router.get("/ntfyStartup", handler_ntfyStartup);
|
||||
router.get('/fees', handler_fees);
|
||||
router.post('/doAddFeeCategory', handler_doAddFeeCategory);
|
||||
router.post('/doUpdateFeeCategory', handler_doUpdateFeeCategory);
|
||||
router.post('/doMoveFeeCategoryUp', handler_doMoveFeeCategoryUp);
|
||||
router.post('/doMoveFeeCategoryDown', handler_doMoveFeeCategoryDown);
|
||||
router.post('/doDeleteFeeCategory', handler_doDeleteFeeCategory);
|
||||
router.post('/doAddFee', handler_doAddFee);
|
||||
router.post('/doUpdateFee', handler_doUpdateFee);
|
||||
router.post('/doMoveFeeUp', handler_doMoveFeeUp);
|
||||
router.post('/doMoveFeeDown', handler_doMoveFeeDown);
|
||||
router.post('/doDeleteFee', handler_doDeleteFee);
|
||||
router.get('/occupancyTypes', handler_occupancyTypes);
|
||||
router.post('/doAddOccupancyType', handler_doAddOccupancyType);
|
||||
router.post('/doUpdateOccupancyType', handler_doUpdateOccupancyType);
|
||||
router.post('/doMoveOccupancyTypeUp', handler_doMoveOccupancyTypeUp);
|
||||
router.post('/doMoveOccupancyTypeDown', handler_doMoveOccupancyTypeDown);
|
||||
router.post('/doDeleteOccupancyType', handler_doDeleteOccupancyType);
|
||||
router.post('/doAddOccupancyTypeField', handler_doAddOccupancyTypeField);
|
||||
router.post('/doUpdateOccupancyTypeField', handler_doUpdateOccupancyTypeField);
|
||||
router.post('/doMoveOccupancyTypeFieldUp', handler_doMoveOccupancyTypeFieldUp);
|
||||
router.post('/doMoveOccupancyTypeFieldDown', handler_doMoveOccupancyTypeFieldDown);
|
||||
router.post('/doDeleteOccupancyTypeField', handler_doDeleteOccupancyTypeField);
|
||||
router.post('/doAddOccupancyTypePrint', handler_doAddOccupancyTypePrint);
|
||||
router.post('/doMoveOccupancyTypePrintUp', handler_doMoveOccupancyTypePrintUp);
|
||||
router.post('/doMoveOccupancyTypePrintDown', handler_doMoveOccupancyTypePrintDown);
|
||||
router.post('/doDeleteOccupancyTypePrint', handler_doDeleteOccupancyTypePrint);
|
||||
router.get('/lotTypes', handler_lotTypes);
|
||||
router.post('/doAddLotType', handler_doAddLotType);
|
||||
router.post('/doUpdateLotType', handler_doUpdateLotType);
|
||||
router.post('/doMoveLotTypeUp', handler_doMoveLotTypeUp);
|
||||
router.post('/doMoveLotTypeDown', handler_doMoveLotTypeDown);
|
||||
router.post('/doDeleteLotType', handler_doDeleteLotType);
|
||||
router.post('/doAddLotTypeField', handler_doAddLotTypeField);
|
||||
router.post('/doUpdateLotTypeField', handler_doUpdateLotTypeField);
|
||||
router.post('/doMoveLotTypeFieldUp', handler_doMoveLotTypeFieldUp);
|
||||
router.post('/doMoveLotTypeFieldDown', handler_doMoveLotTypeFieldDown);
|
||||
router.post('/doDeleteLotTypeField', handler_doDeleteLotTypeField);
|
||||
router.get('/tables', handler_tables);
|
||||
router.post('/doAddWorkOrderType', handler_doAddWorkOrderType);
|
||||
router.post('/doUpdateWorkOrderType', handler_doUpdateWorkOrderType);
|
||||
router.post('/doMoveWorkOrderTypeUp', handler_doMoveWorkOrderTypeUp);
|
||||
router.post('/doMoveWorkOrderTypeDown', handler_doMoveWorkOrderTypeDown);
|
||||
router.post('/doDeleteWorkOrderType', handler_doDeleteWorkOrderType);
|
||||
router.post('/doAddWorkOrderMilestoneType', handler_doAddWorkOrderMilestoneType);
|
||||
router.post('/doUpdateWorkOrderMilestoneType', handler_doUpdateWorkOrderMilestoneType);
|
||||
router.post('/doMoveWorkOrderMilestoneTypeUp', handler_doMoveWorkOrderMilestoneTypeUp);
|
||||
router.post('/doMoveWorkOrderMilestoneTypeDown', handler_doMoveWorkOrderMilestoneTypeDown);
|
||||
router.post('/doDeleteWorkOrderMilestoneType', handler_doDeleteWorkOrderMilestoneType);
|
||||
router.post('/doAddLotStatus', handler_doAddLotStatus);
|
||||
router.post('/doUpdateLotStatus', handler_doUpdateLotStatus);
|
||||
router.post('/doMoveLotStatusUp', handler_doMoveLotStatusUp);
|
||||
router.post('/doMoveLotStatusDown', handler_doMoveLotStatusDown);
|
||||
router.post('/doDeleteLotStatus', handler_doDeleteLotStatus);
|
||||
router.post('/doAddLotOccupantType', handler_doAddLotOccupantType);
|
||||
router.post('/doUpdateLotOccupantType', handler_doUpdateLotOccupantType);
|
||||
router.post('/doMoveLotOccupantTypeUp', handler_doMoveLotOccupantTypeUp);
|
||||
router.post('/doMoveLotOccupantTypeDown', handler_doMoveLotOccupantTypeDown);
|
||||
router.post('/doDeleteLotOccupantType', handler_doDeleteLotOccupantType);
|
||||
router.get('/cleanup', handler_cleanup);
|
||||
router.post('/doCleanupDatabase', handler_doCleanupDatabase);
|
||||
router.get('/ntfyStartup', handler_ntfyStartup);
|
||||
export default router;
|
||||
|
|
|
|||
270
routes/admin.ts
270
routes/admin.ts
|
|
@ -1,254 +1,272 @@
|
|||
import { Router } from "express";
|
||||
import { Router } from 'express'
|
||||
|
||||
// Fee Management
|
||||
|
||||
import handler_fees from "../handlers/admin-get/fees.js";
|
||||
import handler_fees from '../handlers/admin-get/fees.js'
|
||||
|
||||
import handler_doAddFeeCategory from "../handlers/admin-post/doAddFeeCategory.js";
|
||||
import handler_doUpdateFeeCategory from "../handlers/admin-post/doUpdateFeeCategory.js";
|
||||
import handler_doMoveFeeCategoryUp from "../handlers/admin-post/doMoveFeeCategoryUp.js";
|
||||
import handler_doMoveFeeCategoryDown from "../handlers/admin-post/doMoveFeeCategoryDown.js";
|
||||
import handler_doDeleteFeeCategory from "../handlers/admin-post/doDeleteFeeCategory.js";
|
||||
import handler_doAddFeeCategory from '../handlers/admin-post/doAddFeeCategory.js'
|
||||
import handler_doUpdateFeeCategory from '../handlers/admin-post/doUpdateFeeCategory.js'
|
||||
import handler_doMoveFeeCategoryUp from '../handlers/admin-post/doMoveFeeCategoryUp.js'
|
||||
import handler_doMoveFeeCategoryDown from '../handlers/admin-post/doMoveFeeCategoryDown.js'
|
||||
import handler_doDeleteFeeCategory from '../handlers/admin-post/doDeleteFeeCategory.js'
|
||||
|
||||
import handler_doAddFee from "../handlers/admin-post/doAddFee.js";
|
||||
import handler_doUpdateFee from "../handlers/admin-post/doUpdateFee.js";
|
||||
import handler_doMoveFeeUp from "../handlers/admin-post/doMoveFeeUp.js";
|
||||
import handler_doMoveFeeDown from "../handlers/admin-post/doMoveFeeDown.js";
|
||||
import handler_doDeleteFee from "../handlers/admin-post/doDeleteFee.js";
|
||||
import handler_doAddFee from '../handlers/admin-post/doAddFee.js'
|
||||
import handler_doUpdateFee from '../handlers/admin-post/doUpdateFee.js'
|
||||
import handler_doMoveFeeUp from '../handlers/admin-post/doMoveFeeUp.js'
|
||||
import handler_doMoveFeeDown from '../handlers/admin-post/doMoveFeeDown.js'
|
||||
import handler_doDeleteFee from '../handlers/admin-post/doDeleteFee.js'
|
||||
|
||||
// Occupancy Type Management
|
||||
|
||||
import handler_occupancyTypes from "../handlers/admin-get/occupancyTypes.js";
|
||||
import handler_occupancyTypes from '../handlers/admin-get/occupancyTypes.js'
|
||||
|
||||
import handler_doAddOccupancyType from "../handlers/admin-post/doAddOccupancyType.js";
|
||||
import handler_doUpdateOccupancyType from "../handlers/admin-post/doUpdateOccupancyType.js";
|
||||
import handler_doMoveOccupancyTypeUp from "../handlers/admin-post/doMoveOccupancyTypeUp.js";
|
||||
import handler_doMoveOccupancyTypeDown from "../handlers/admin-post/doMoveOccupancyTypeDown.js";
|
||||
import handler_doDeleteOccupancyType from "../handlers/admin-post/doDeleteOccupancyType.js";
|
||||
import handler_doAddOccupancyType from '../handlers/admin-post/doAddOccupancyType.js'
|
||||
import handler_doUpdateOccupancyType from '../handlers/admin-post/doUpdateOccupancyType.js'
|
||||
import handler_doMoveOccupancyTypeUp from '../handlers/admin-post/doMoveOccupancyTypeUp.js'
|
||||
import handler_doMoveOccupancyTypeDown from '../handlers/admin-post/doMoveOccupancyTypeDown.js'
|
||||
import handler_doDeleteOccupancyType from '../handlers/admin-post/doDeleteOccupancyType.js'
|
||||
|
||||
import handler_doAddOccupancyTypeField from "../handlers/admin-post/doAddOccupancyTypeField.js";
|
||||
import handler_doUpdateOccupancyTypeField from "../handlers/admin-post/doUpdateOccupancyTypeField.js";
|
||||
import handler_doMoveOccupancyTypeFieldUp from "../handlers/admin-post/doMoveOccupancyTypeFieldUp.js";
|
||||
import handler_doMoveOccupancyTypeFieldDown from "../handlers/admin-post/doMoveOccupancyTypeFieldDown.js";
|
||||
import handler_doDeleteOccupancyTypeField from "../handlers/admin-post/doDeleteOccupancyTypeField.js";
|
||||
import handler_doAddOccupancyTypeField from '../handlers/admin-post/doAddOccupancyTypeField.js'
|
||||
import handler_doUpdateOccupancyTypeField from '../handlers/admin-post/doUpdateOccupancyTypeField.js'
|
||||
import handler_doMoveOccupancyTypeFieldUp from '../handlers/admin-post/doMoveOccupancyTypeFieldUp.js'
|
||||
import handler_doMoveOccupancyTypeFieldDown from '../handlers/admin-post/doMoveOccupancyTypeFieldDown.js'
|
||||
import handler_doDeleteOccupancyTypeField from '../handlers/admin-post/doDeleteOccupancyTypeField.js'
|
||||
|
||||
import handler_doAddOccupancyTypePrint from "../handlers/admin-post/doAddOccupancyTypePrint.js";
|
||||
import handler_doMoveOccupancyTypePrintUp from "../handlers/admin-post/doMoveOccupancyTypePrintUp.js";
|
||||
import handler_doMoveOccupancyTypePrintDown from "../handlers/admin-post/doMoveOccupancyTypePrintDown.js";
|
||||
import handler_doDeleteOccupancyTypePrint from "../handlers/admin-post/doDeleteOccupancyTypePrint.js";
|
||||
import handler_doAddOccupancyTypePrint from '../handlers/admin-post/doAddOccupancyTypePrint.js'
|
||||
import handler_doMoveOccupancyTypePrintUp from '../handlers/admin-post/doMoveOccupancyTypePrintUp.js'
|
||||
import handler_doMoveOccupancyTypePrintDown from '../handlers/admin-post/doMoveOccupancyTypePrintDown.js'
|
||||
import handler_doDeleteOccupancyTypePrint from '../handlers/admin-post/doDeleteOccupancyTypePrint.js'
|
||||
|
||||
// Lot Type Management
|
||||
|
||||
import handler_lotTypes from "../handlers/admin-get/lotTypes.js";
|
||||
import handler_lotTypes from '../handlers/admin-get/lotTypes.js'
|
||||
|
||||
import handler_doAddLotType from "../handlers/admin-post/doAddLotType.js";
|
||||
import handler_doUpdateLotType from "../handlers/admin-post/doUpdateLotType.js";
|
||||
import handler_doMoveLotTypeUp from "../handlers/admin-post/doMoveLotTypeUp.js";
|
||||
import handler_doMoveLotTypeDown from "../handlers/admin-post/doMoveLotTypeDown.js";
|
||||
import handler_doDeleteLotType from "../handlers/admin-post/doDeleteLotType.js";
|
||||
import handler_doAddLotType from '../handlers/admin-post/doAddLotType.js'
|
||||
import handler_doUpdateLotType from '../handlers/admin-post/doUpdateLotType.js'
|
||||
import handler_doMoveLotTypeUp from '../handlers/admin-post/doMoveLotTypeUp.js'
|
||||
import handler_doMoveLotTypeDown from '../handlers/admin-post/doMoveLotTypeDown.js'
|
||||
import handler_doDeleteLotType from '../handlers/admin-post/doDeleteLotType.js'
|
||||
|
||||
import handler_doAddLotTypeField from "../handlers/admin-post/doAddLotTypeField.js";
|
||||
import handler_doUpdateLotTypeField from "../handlers/admin-post/doUpdateLotTypeField.js";
|
||||
import handler_doMoveLotTypeFieldUp from "../handlers/admin-post/doMoveLotTypeFieldUp.js";
|
||||
import handler_doMoveLotTypeFieldDown from "../handlers/admin-post/doMoveLotTypeFieldDown.js";
|
||||
import handler_doDeleteLotTypeField from "../handlers/admin-post/doDeleteLotTypeField.js";
|
||||
import handler_doAddLotTypeField from '../handlers/admin-post/doAddLotTypeField.js'
|
||||
import handler_doUpdateLotTypeField from '../handlers/admin-post/doUpdateLotTypeField.js'
|
||||
import handler_doMoveLotTypeFieldUp from '../handlers/admin-post/doMoveLotTypeFieldUp.js'
|
||||
import handler_doMoveLotTypeFieldDown from '../handlers/admin-post/doMoveLotTypeFieldDown.js'
|
||||
import handler_doDeleteLotTypeField from '../handlers/admin-post/doDeleteLotTypeField.js'
|
||||
|
||||
// Config Table Management
|
||||
|
||||
import handler_tables from "../handlers/admin-get/tables.js";
|
||||
import handler_tables from '../handlers/admin-get/tables.js'
|
||||
|
||||
import handler_doAddWorkOrderType from "../handlers/admin-post/doAddWorkOrderType.js";
|
||||
import handler_doUpdateWorkOrderType from "../handlers/admin-post/doUpdateWorkOrderType.js";
|
||||
import handler_doMoveWorkOrderTypeUp from "../handlers/admin-post/doMoveWorkOrderTypeUp.js";
|
||||
import handler_doMoveWorkOrderTypeDown from "../handlers/admin-post/doMoveWorkOrderTypeDown.js";
|
||||
import handler_doDeleteWorkOrderType from "../handlers/admin-post/doDeleteWorkOrderType.js";
|
||||
import handler_doAddWorkOrderType from '../handlers/admin-post/doAddWorkOrderType.js'
|
||||
import handler_doUpdateWorkOrderType from '../handlers/admin-post/doUpdateWorkOrderType.js'
|
||||
import handler_doMoveWorkOrderTypeUp from '../handlers/admin-post/doMoveWorkOrderTypeUp.js'
|
||||
import handler_doMoveWorkOrderTypeDown from '../handlers/admin-post/doMoveWorkOrderTypeDown.js'
|
||||
import handler_doDeleteWorkOrderType from '../handlers/admin-post/doDeleteWorkOrderType.js'
|
||||
|
||||
import handler_doAddWorkOrderMilestoneType from "../handlers/admin-post/doAddWorkOrderMilestoneType.js";
|
||||
import handler_doUpdateWorkOrderMilestoneType from "../handlers/admin-post/doUpdateWorkOrderMilestoneType.js";
|
||||
import handler_doMoveWorkOrderMilestoneTypeUp from "../handlers/admin-post/doMoveWorkOrderMilestoneTypeUp.js";
|
||||
import handler_doMoveWorkOrderMilestoneTypeDown from "../handlers/admin-post/doMoveWorkOrderMilestoneTypeDown.js";
|
||||
import handler_doDeleteWorkOrderMilestoneType from "../handlers/admin-post/doDeleteWorkOrderMilestoneType.js";
|
||||
import handler_doAddWorkOrderMilestoneType from '../handlers/admin-post/doAddWorkOrderMilestoneType.js'
|
||||
import handler_doUpdateWorkOrderMilestoneType from '../handlers/admin-post/doUpdateWorkOrderMilestoneType.js'
|
||||
import handler_doMoveWorkOrderMilestoneTypeUp from '../handlers/admin-post/doMoveWorkOrderMilestoneTypeUp.js'
|
||||
import handler_doMoveWorkOrderMilestoneTypeDown from '../handlers/admin-post/doMoveWorkOrderMilestoneTypeDown.js'
|
||||
import handler_doDeleteWorkOrderMilestoneType from '../handlers/admin-post/doDeleteWorkOrderMilestoneType.js'
|
||||
|
||||
import handler_doAddLotStatus from "../handlers/admin-post/doAddLotStatus.js";
|
||||
import handler_doUpdateLotStatus from "../handlers/admin-post/doUpdateLotStatus.js";
|
||||
import handler_doMoveLotStatusUp from "../handlers/admin-post/doMoveLotStatusUp.js";
|
||||
import handler_doMoveLotStatusDown from "../handlers/admin-post/doMoveLotStatusDown.js";
|
||||
import handler_doDeleteLotStatus from "../handlers/admin-post/doDeleteLotStatus.js";
|
||||
import handler_doAddLotStatus from '../handlers/admin-post/doAddLotStatus.js'
|
||||
import handler_doUpdateLotStatus from '../handlers/admin-post/doUpdateLotStatus.js'
|
||||
import handler_doMoveLotStatusUp from '../handlers/admin-post/doMoveLotStatusUp.js'
|
||||
import handler_doMoveLotStatusDown from '../handlers/admin-post/doMoveLotStatusDown.js'
|
||||
import handler_doDeleteLotStatus from '../handlers/admin-post/doDeleteLotStatus.js'
|
||||
|
||||
import handler_doAddLotOccupantType from "../handlers/admin-post/doAddLotOccupantType.js";
|
||||
import handler_doUpdateLotOccupantType from "../handlers/admin-post/doUpdateLotOccupantType.js";
|
||||
import handler_doMoveLotOccupantTypeUp from "../handlers/admin-post/doMoveLotOccupantTypeUp.js";
|
||||
import handler_doMoveLotOccupantTypeDown from "../handlers/admin-post/doMoveLotOccupantTypeDown.js";
|
||||
import handler_doDeleteLotOccupantType from "../handlers/admin-post/doDeleteLotOccupantType.js";
|
||||
import handler_doAddLotOccupantType from '../handlers/admin-post/doAddLotOccupantType.js'
|
||||
import handler_doUpdateLotOccupantType from '../handlers/admin-post/doUpdateLotOccupantType.js'
|
||||
import handler_doMoveLotOccupantTypeUp from '../handlers/admin-post/doMoveLotOccupantTypeUp.js'
|
||||
import handler_doMoveLotOccupantTypeDown from '../handlers/admin-post/doMoveLotOccupantTypeDown.js'
|
||||
import handler_doDeleteLotOccupantType from '../handlers/admin-post/doDeleteLotOccupantType.js'
|
||||
|
||||
// Cleanup
|
||||
|
||||
import handler_cleanup from "../handlers/admin-get/cleanup.js";
|
||||
import handler_doCleanupDatabase from "../handlers/admin-post/doCleanupDatabase.js";
|
||||
import handler_cleanup from '../handlers/admin-get/cleanup.js'
|
||||
import handler_doCleanupDatabase from '../handlers/admin-post/doCleanupDatabase.js'
|
||||
|
||||
// Ntfy Startup
|
||||
|
||||
import handler_ntfyStartup from "../handlers/admin-get/ntfyStartup.js";
|
||||
import handler_ntfyStartup from '../handlers/admin-get/ntfyStartup.js'
|
||||
|
||||
export const router = Router();
|
||||
export const router = Router()
|
||||
|
||||
/*
|
||||
* Fees
|
||||
*/
|
||||
|
||||
router.get("/fees", handler_fees);
|
||||
router.get('/fees', handler_fees)
|
||||
|
||||
router.post("/doAddFeeCategory", handler_doAddFeeCategory);
|
||||
router.post('/doAddFeeCategory', handler_doAddFeeCategory)
|
||||
|
||||
router.post("/doUpdateFeeCategory", handler_doUpdateFeeCategory);
|
||||
router.post('/doUpdateFeeCategory', handler_doUpdateFeeCategory)
|
||||
|
||||
router.post("/doMoveFeeCategoryUp", handler_doMoveFeeCategoryUp);
|
||||
router.post('/doMoveFeeCategoryUp', handler_doMoveFeeCategoryUp)
|
||||
|
||||
router.post("/doMoveFeeCategoryDown", handler_doMoveFeeCategoryDown);
|
||||
router.post('/doMoveFeeCategoryDown', handler_doMoveFeeCategoryDown)
|
||||
|
||||
router.post("/doDeleteFeeCategory", handler_doDeleteFeeCategory);
|
||||
router.post('/doDeleteFeeCategory', handler_doDeleteFeeCategory)
|
||||
|
||||
router.post("/doAddFee", handler_doAddFee);
|
||||
router.post('/doAddFee', handler_doAddFee)
|
||||
|
||||
router.post("/doUpdateFee", handler_doUpdateFee);
|
||||
router.post('/doUpdateFee', handler_doUpdateFee)
|
||||
|
||||
router.post("/doMoveFeeUp", handler_doMoveFeeUp);
|
||||
router.post('/doMoveFeeUp', handler_doMoveFeeUp)
|
||||
|
||||
router.post("/doMoveFeeDown", handler_doMoveFeeDown);
|
||||
router.post('/doMoveFeeDown', handler_doMoveFeeDown)
|
||||
|
||||
router.post("/doDeleteFee", handler_doDeleteFee);
|
||||
router.post('/doDeleteFee', handler_doDeleteFee)
|
||||
|
||||
/*
|
||||
* Occupancy Type Management
|
||||
*/
|
||||
|
||||
router.get("/occupancyTypes", handler_occupancyTypes);
|
||||
router.get('/occupancyTypes', handler_occupancyTypes)
|
||||
|
||||
router.post("/doAddOccupancyType", handler_doAddOccupancyType);
|
||||
router.post('/doAddOccupancyType', handler_doAddOccupancyType)
|
||||
|
||||
router.post("/doUpdateOccupancyType", handler_doUpdateOccupancyType);
|
||||
router.post('/doUpdateOccupancyType', handler_doUpdateOccupancyType)
|
||||
|
||||
router.post("/doMoveOccupancyTypeUp", handler_doMoveOccupancyTypeUp);
|
||||
router.post('/doMoveOccupancyTypeUp', handler_doMoveOccupancyTypeUp)
|
||||
|
||||
router.post("/doMoveOccupancyTypeDown", handler_doMoveOccupancyTypeDown);
|
||||
router.post('/doMoveOccupancyTypeDown', handler_doMoveOccupancyTypeDown)
|
||||
|
||||
router.post("/doDeleteOccupancyType", handler_doDeleteOccupancyType);
|
||||
router.post('/doDeleteOccupancyType', handler_doDeleteOccupancyType)
|
||||
|
||||
// Occupancy Type Fields
|
||||
|
||||
router.post("/doAddOccupancyTypeField", handler_doAddOccupancyTypeField);
|
||||
router.post('/doAddOccupancyTypeField', handler_doAddOccupancyTypeField)
|
||||
|
||||
router.post("/doUpdateOccupancyTypeField", handler_doUpdateOccupancyTypeField);
|
||||
router.post('/doUpdateOccupancyTypeField', handler_doUpdateOccupancyTypeField)
|
||||
|
||||
router.post("/doMoveOccupancyTypeFieldUp", handler_doMoveOccupancyTypeFieldUp);
|
||||
router.post('/doMoveOccupancyTypeFieldUp', handler_doMoveOccupancyTypeFieldUp)
|
||||
|
||||
router.post("/doMoveOccupancyTypeFieldDown", handler_doMoveOccupancyTypeFieldDown);
|
||||
router.post(
|
||||
'/doMoveOccupancyTypeFieldDown',
|
||||
handler_doMoveOccupancyTypeFieldDown
|
||||
)
|
||||
|
||||
router.post("/doDeleteOccupancyTypeField", handler_doDeleteOccupancyTypeField);
|
||||
router.post('/doDeleteOccupancyTypeField', handler_doDeleteOccupancyTypeField)
|
||||
|
||||
// Occupancy Type Prints
|
||||
|
||||
router.post("/doAddOccupancyTypePrint", handler_doAddOccupancyTypePrint);
|
||||
router.post('/doAddOccupancyTypePrint', handler_doAddOccupancyTypePrint)
|
||||
|
||||
router.post("/doMoveOccupancyTypePrintUp", handler_doMoveOccupancyTypePrintUp);
|
||||
router.post('/doMoveOccupancyTypePrintUp', handler_doMoveOccupancyTypePrintUp)
|
||||
|
||||
router.post("/doMoveOccupancyTypePrintDown", handler_doMoveOccupancyTypePrintDown);
|
||||
router.post(
|
||||
'/doMoveOccupancyTypePrintDown',
|
||||
handler_doMoveOccupancyTypePrintDown
|
||||
)
|
||||
|
||||
router.post("/doDeleteOccupancyTypePrint", handler_doDeleteOccupancyTypePrint);
|
||||
router.post('/doDeleteOccupancyTypePrint', handler_doDeleteOccupancyTypePrint)
|
||||
|
||||
/*
|
||||
* Lot Type Management
|
||||
*/
|
||||
|
||||
router.get("/lotTypes", handler_lotTypes);
|
||||
router.get('/lotTypes', handler_lotTypes)
|
||||
|
||||
router.post("/doAddLotType", handler_doAddLotType);
|
||||
router.post('/doAddLotType', handler_doAddLotType)
|
||||
|
||||
router.post("/doUpdateLotType", handler_doUpdateLotType);
|
||||
router.post('/doUpdateLotType', handler_doUpdateLotType)
|
||||
|
||||
router.post("/doMoveLotTypeUp", handler_doMoveLotTypeUp);
|
||||
router.post('/doMoveLotTypeUp', handler_doMoveLotTypeUp)
|
||||
|
||||
router.post("/doMoveLotTypeDown", handler_doMoveLotTypeDown);
|
||||
router.post('/doMoveLotTypeDown', handler_doMoveLotTypeDown)
|
||||
|
||||
router.post("/doDeleteLotType", handler_doDeleteLotType);
|
||||
router.post('/doDeleteLotType', handler_doDeleteLotType)
|
||||
|
||||
// Lot Type Fields
|
||||
|
||||
router.post("/doAddLotTypeField", handler_doAddLotTypeField);
|
||||
router.post('/doAddLotTypeField', handler_doAddLotTypeField)
|
||||
|
||||
router.post("/doUpdateLotTypeField", handler_doUpdateLotTypeField);
|
||||
router.post('/doUpdateLotTypeField', handler_doUpdateLotTypeField)
|
||||
|
||||
router.post("/doMoveLotTypeFieldUp", handler_doMoveLotTypeFieldUp);
|
||||
router.post('/doMoveLotTypeFieldUp', handler_doMoveLotTypeFieldUp)
|
||||
|
||||
router.post("/doMoveLotTypeFieldDown", handler_doMoveLotTypeFieldDown);
|
||||
router.post('/doMoveLotTypeFieldDown', handler_doMoveLotTypeFieldDown)
|
||||
|
||||
router.post("/doDeleteLotTypeField", handler_doDeleteLotTypeField);
|
||||
router.post('/doDeleteLotTypeField', handler_doDeleteLotTypeField)
|
||||
|
||||
/*
|
||||
* Config Tables
|
||||
*/
|
||||
|
||||
router.get("/tables", handler_tables);
|
||||
router.get('/tables', handler_tables)
|
||||
|
||||
// Config Tables - Work Order Types
|
||||
|
||||
router.post("/doAddWorkOrderType", handler_doAddWorkOrderType);
|
||||
router.post('/doAddWorkOrderType', handler_doAddWorkOrderType)
|
||||
|
||||
router.post("/doUpdateWorkOrderType", handler_doUpdateWorkOrderType);
|
||||
router.post('/doUpdateWorkOrderType', handler_doUpdateWorkOrderType)
|
||||
|
||||
router.post("/doMoveWorkOrderTypeUp", handler_doMoveWorkOrderTypeUp);
|
||||
router.post('/doMoveWorkOrderTypeUp', handler_doMoveWorkOrderTypeUp)
|
||||
|
||||
router.post("/doMoveWorkOrderTypeDown", handler_doMoveWorkOrderTypeDown);
|
||||
router.post('/doMoveWorkOrderTypeDown', handler_doMoveWorkOrderTypeDown)
|
||||
|
||||
router.post("/doDeleteWorkOrderType", handler_doDeleteWorkOrderType);
|
||||
router.post('/doDeleteWorkOrderType', handler_doDeleteWorkOrderType)
|
||||
// Config Tables - Work Order Milestone Types
|
||||
|
||||
router.post(
|
||||
"/doAddWorkOrderMilestoneType",
|
||||
'/doAddWorkOrderMilestoneType',
|
||||
|
||||
handler_doAddWorkOrderMilestoneType
|
||||
);
|
||||
)
|
||||
|
||||
router.post("/doUpdateWorkOrderMilestoneType", handler_doUpdateWorkOrderMilestoneType);
|
||||
router.post(
|
||||
'/doUpdateWorkOrderMilestoneType',
|
||||
handler_doUpdateWorkOrderMilestoneType
|
||||
)
|
||||
|
||||
router.post("/doMoveWorkOrderMilestoneTypeUp", handler_doMoveWorkOrderMilestoneTypeUp);
|
||||
router.post(
|
||||
'/doMoveWorkOrderMilestoneTypeUp',
|
||||
handler_doMoveWorkOrderMilestoneTypeUp
|
||||
)
|
||||
|
||||
router.post("/doMoveWorkOrderMilestoneTypeDown", handler_doMoveWorkOrderMilestoneTypeDown);
|
||||
router.post(
|
||||
'/doMoveWorkOrderMilestoneTypeDown',
|
||||
handler_doMoveWorkOrderMilestoneTypeDown
|
||||
)
|
||||
|
||||
router.post("/doDeleteWorkOrderMilestoneType", handler_doDeleteWorkOrderMilestoneType);
|
||||
router.post(
|
||||
'/doDeleteWorkOrderMilestoneType',
|
||||
handler_doDeleteWorkOrderMilestoneType
|
||||
)
|
||||
|
||||
// Config Tables - Lot Statuses
|
||||
|
||||
router.post("/doAddLotStatus", handler_doAddLotStatus);
|
||||
router.post('/doAddLotStatus', handler_doAddLotStatus)
|
||||
|
||||
router.post("/doUpdateLotStatus", handler_doUpdateLotStatus);
|
||||
router.post('/doUpdateLotStatus', handler_doUpdateLotStatus)
|
||||
|
||||
router.post("/doMoveLotStatusUp", handler_doMoveLotStatusUp);
|
||||
router.post('/doMoveLotStatusUp', handler_doMoveLotStatusUp)
|
||||
|
||||
router.post("/doMoveLotStatusDown", handler_doMoveLotStatusDown);
|
||||
router.post('/doMoveLotStatusDown', handler_doMoveLotStatusDown)
|
||||
|
||||
router.post("/doDeleteLotStatus", handler_doDeleteLotStatus);
|
||||
router.post('/doDeleteLotStatus', handler_doDeleteLotStatus)
|
||||
|
||||
// Config Tables - Lot Occupant Types
|
||||
|
||||
router.post("/doAddLotOccupantType", handler_doAddLotOccupantType);
|
||||
router.post('/doAddLotOccupantType', handler_doAddLotOccupantType)
|
||||
|
||||
router.post("/doUpdateLotOccupantType", handler_doUpdateLotOccupantType);
|
||||
router.post('/doUpdateLotOccupantType', handler_doUpdateLotOccupantType)
|
||||
|
||||
router.post("/doMoveLotOccupantTypeUp", handler_doMoveLotOccupantTypeUp);
|
||||
router.post('/doMoveLotOccupantTypeUp', handler_doMoveLotOccupantTypeUp)
|
||||
|
||||
router.post("/doMoveLotOccupantTypeDown", handler_doMoveLotOccupantTypeDown);
|
||||
router.post('/doMoveLotOccupantTypeDown', handler_doMoveLotOccupantTypeDown)
|
||||
|
||||
router.post("/doDeleteLotOccupantType", handler_doDeleteLotOccupantType);
|
||||
router.post('/doDeleteLotOccupantType', handler_doDeleteLotOccupantType)
|
||||
|
||||
// Cleanup
|
||||
|
||||
router.get("/cleanup", handler_cleanup);
|
||||
router.get('/cleanup', handler_cleanup)
|
||||
|
||||
router.post("/doCleanupDatabase", handler_doCleanupDatabase);
|
||||
router.post('/doCleanupDatabase', handler_doCleanupDatabase)
|
||||
|
||||
// Ntfy Startup
|
||||
|
||||
router.get("/ntfyStartup", handler_ntfyStartup);
|
||||
router.get('/ntfyStartup', handler_ntfyStartup)
|
||||
|
||||
export default router;
|
||||
export default router
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Router } from "express";
|
||||
import handler_milestoneICS from "../handlers/api-get/milestoneICS.js";
|
||||
import { Router } from 'express';
|
||||
import handler_milestoneICS from '../handlers/api-get/milestoneICS.js';
|
||||
export const router = Router();
|
||||
router.get("/milestoneICS", handler_milestoneICS);
|
||||
router.get('/milestoneICS', handler_milestoneICS);
|
||||
export default router;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { Router } from "express";
|
||||
import { Router } from 'express'
|
||||
|
||||
import handler_milestoneICS from "../handlers/api-get/milestoneICS.js";
|
||||
import handler_milestoneICS from '../handlers/api-get/milestoneICS.js'
|
||||
|
||||
export const router = Router();
|
||||
export const router = Router()
|
||||
|
||||
router.get("/milestoneICS", handler_milestoneICS);
|
||||
router.get('/milestoneICS', handler_milestoneICS)
|
||||
|
||||
export default router;
|
||||
export default router
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Router } from "express";
|
||||
import handler_dashboard from "../handlers/dashboard-get/dashboard.js";
|
||||
import { Router } from 'express';
|
||||
import handler_dashboard from '../handlers/dashboard-get/dashboard.js';
|
||||
export const router = Router();
|
||||
router.get("/", handler_dashboard);
|
||||
router.get('/', handler_dashboard);
|
||||
export default router;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { Router } from "express";
|
||||
import { Router } from 'express'
|
||||
|
||||
import handler_dashboard from "../handlers/dashboard-get/dashboard.js";
|
||||
import handler_dashboard from '../handlers/dashboard-get/dashboard.js'
|
||||
|
||||
export const router = Router();
|
||||
export const router = Router()
|
||||
|
||||
router.get("/", handler_dashboard);
|
||||
router.get('/', handler_dashboard)
|
||||
|
||||
export default router;
|
||||
export default router
|
||||
|
|
|
|||
|
|
@ -1,61 +1,63 @@
|
|||
import { Router } from "express";
|
||||
import * as configFunctions from "../helpers/functions.config.js";
|
||||
import * as authenticationFunctions from "../helpers/functions.authentication.js";
|
||||
import { useTestDatabases } from "../data/databasePaths.js";
|
||||
import { getApiKey } from "../helpers/functions.api.js";
|
||||
import Debug from "debug";
|
||||
const debug = Debug("lot-occupancy-system:login");
|
||||
import { Router } from 'express';
|
||||
import * as configFunctions from '../helpers/functions.config.js';
|
||||
import * as authenticationFunctions from '../helpers/functions.authentication.js';
|
||||
import { useTestDatabases } from '../data/databasePaths.js';
|
||||
import { getApiKey } from '../helpers/functions.api.js';
|
||||
import Debug from 'debug';
|
||||
const debug = Debug('lot-occupancy-system:login');
|
||||
export const router = Router();
|
||||
router
|
||||
.route("/")
|
||||
.route('/')
|
||||
.get((request, response) => {
|
||||
const sessionCookieName = configFunctions.getProperty("session.cookieName");
|
||||
const sessionCookieName = configFunctions.getProperty('session.cookieName');
|
||||
if (request.session.user && request.cookies[sessionCookieName]) {
|
||||
const redirectURL = authenticationFunctions.getSafeRedirectURL((request.query.redirect || ""));
|
||||
const redirectURL = authenticationFunctions.getSafeRedirectURL((request.query.redirect ?? ''));
|
||||
response.redirect(redirectURL);
|
||||
}
|
||||
else {
|
||||
response.render("login", {
|
||||
userName: "",
|
||||
message: "",
|
||||
response.render('login', {
|
||||
userName: '',
|
||||
message: '',
|
||||
redirect: request.query.redirect,
|
||||
useTestDatabases
|
||||
});
|
||||
}
|
||||
})
|
||||
.post(async (request, response) => {
|
||||
const userName = (typeof request.body.userName === "string" ? request.body.userName : "");
|
||||
const passwordPlain = (typeof request.body.password === "string" ? request.body.password : "");
|
||||
const userName = (typeof request.body.userName === 'string' ? request.body.userName : '');
|
||||
const passwordPlain = (typeof request.body.password === 'string' ? request.body.password : '');
|
||||
const unsafeRedirectURL = request.body.redirect;
|
||||
const redirectURL = authenticationFunctions.getSafeRedirectURL(typeof unsafeRedirectURL === "string" ? unsafeRedirectURL : "");
|
||||
const redirectURL = authenticationFunctions.getSafeRedirectURL(typeof unsafeRedirectURL === 'string' ? unsafeRedirectURL : '');
|
||||
let isAuthenticated = false;
|
||||
if (userName.charAt(0) === "*") {
|
||||
if (userName.charAt(0) === '*') {
|
||||
if (useTestDatabases && userName === passwordPlain) {
|
||||
isAuthenticated = configFunctions.getProperty("users.testing").includes(userName);
|
||||
isAuthenticated = configFunctions
|
||||
.getProperty('users.testing')
|
||||
.includes(userName);
|
||||
if (isAuthenticated) {
|
||||
debug("Authenticated testing user: " + userName);
|
||||
debug('Authenticated testing user: ' + userName);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (userName !== "" && passwordPlain !== "") {
|
||||
else if (userName !== '' && passwordPlain !== '') {
|
||||
isAuthenticated = await authenticationFunctions.authenticate(userName, passwordPlain);
|
||||
}
|
||||
let userObject;
|
||||
if (isAuthenticated) {
|
||||
const userNameLowerCase = userName.toLowerCase();
|
||||
const canLogin = configFunctions
|
||||
.getProperty("users.canLogin")
|
||||
.getProperty('users.canLogin')
|
||||
.some((currentUserName) => {
|
||||
return userNameLowerCase === currentUserName.toLowerCase();
|
||||
});
|
||||
if (canLogin) {
|
||||
const canUpdate = configFunctions
|
||||
.getProperty("users.canUpdate")
|
||||
.getProperty('users.canUpdate')
|
||||
.some((currentUserName) => {
|
||||
return userNameLowerCase === currentUserName.toLowerCase();
|
||||
});
|
||||
const isAdmin = configFunctions
|
||||
.getProperty("users.isAdmin")
|
||||
.getProperty('users.isAdmin')
|
||||
.some((currentUserName) => {
|
||||
return userNameLowerCase === currentUserName.toLowerCase();
|
||||
});
|
||||
|
|
@ -75,9 +77,9 @@ router
|
|||
response.redirect(redirectURL);
|
||||
}
|
||||
else {
|
||||
response.render("login", {
|
||||
response.render('login', {
|
||||
userName,
|
||||
message: "Login Failed",
|
||||
message: 'Login Failed',
|
||||
redirect: redirectURL,
|
||||
useTestDatabases
|
||||
});
|
||||
|
|
|
|||
107
routes/login.ts
107
routes/login.ts
|
|
@ -1,95 +1,100 @@
|
|||
import { Router } from "express";
|
||||
import { Router } from 'express'
|
||||
|
||||
import * as configFunctions from "../helpers/functions.config.js";
|
||||
import * as configFunctions from '../helpers/functions.config.js'
|
||||
|
||||
import * as authenticationFunctions from "../helpers/functions.authentication.js";
|
||||
import * as authenticationFunctions from '../helpers/functions.authentication.js'
|
||||
|
||||
import { useTestDatabases } from "../data/databasePaths.js";
|
||||
import { useTestDatabases } from '../data/databasePaths.js'
|
||||
|
||||
import { getApiKey } from "../helpers/functions.api.js";
|
||||
import { getApiKey } from '../helpers/functions.api.js'
|
||||
|
||||
import Debug from "debug";
|
||||
import Debug from 'debug'
|
||||
|
||||
import type * as recordTypes from "../types/recordTypes";
|
||||
import type * as recordTypes from '../types/recordTypes'
|
||||
|
||||
const debug = Debug("lot-occupancy-system:login");
|
||||
const debug = Debug('lot-occupancy-system:login')
|
||||
|
||||
export const router = Router();
|
||||
export const router = Router()
|
||||
|
||||
router
|
||||
.route("/")
|
||||
.route('/')
|
||||
.get((request, response) => {
|
||||
const sessionCookieName = configFunctions.getProperty("session.cookieName");
|
||||
const sessionCookieName = configFunctions.getProperty('session.cookieName')
|
||||
|
||||
if (request.session.user && request.cookies[sessionCookieName]) {
|
||||
const redirectURL = authenticationFunctions.getSafeRedirectURL(
|
||||
(request.query.redirect || "") as string
|
||||
);
|
||||
(request.query.redirect ?? '') as string
|
||||
)
|
||||
|
||||
response.redirect(redirectURL);
|
||||
response.redirect(redirectURL)
|
||||
} else {
|
||||
response.render("login", {
|
||||
userName: "",
|
||||
message: "",
|
||||
response.render('login', {
|
||||
userName: '',
|
||||
message: '',
|
||||
redirect: request.query.redirect,
|
||||
useTestDatabases
|
||||
});
|
||||
})
|
||||
}
|
||||
})
|
||||
.post(async (request, response) => {
|
||||
const userName = (
|
||||
typeof request.body.userName === "string" ? request.body.userName : ""
|
||||
) as string;
|
||||
typeof request.body.userName === 'string' ? request.body.userName : ''
|
||||
) as string
|
||||
|
||||
const passwordPlain = (
|
||||
typeof request.body.password === "string" ? request.body.password : ""
|
||||
) as string;
|
||||
typeof request.body.password === 'string' ? request.body.password : ''
|
||||
) as string
|
||||
|
||||
const unsafeRedirectURL = request.body.redirect;
|
||||
const unsafeRedirectURL = request.body.redirect
|
||||
|
||||
const redirectURL = authenticationFunctions.getSafeRedirectURL(
|
||||
typeof unsafeRedirectURL === "string" ? unsafeRedirectURL : ""
|
||||
);
|
||||
typeof unsafeRedirectURL === 'string' ? unsafeRedirectURL : ''
|
||||
)
|
||||
|
||||
let isAuthenticated = false;
|
||||
let isAuthenticated = false
|
||||
|
||||
if (userName.charAt(0) === "*") {
|
||||
if (userName.charAt(0) === '*') {
|
||||
if (useTestDatabases && userName === passwordPlain) {
|
||||
isAuthenticated = configFunctions.getProperty("users.testing").includes(userName);
|
||||
isAuthenticated = configFunctions
|
||||
.getProperty('users.testing')
|
||||
.includes(userName)
|
||||
|
||||
if (isAuthenticated) {
|
||||
debug("Authenticated testing user: " + userName);
|
||||
debug('Authenticated testing user: ' + userName)
|
||||
}
|
||||
}
|
||||
} else if (userName !== "" && passwordPlain !== "") {
|
||||
isAuthenticated = await authenticationFunctions.authenticate(userName, passwordPlain);
|
||||
} else if (userName !== '' && passwordPlain !== '') {
|
||||
isAuthenticated = await authenticationFunctions.authenticate(
|
||||
userName,
|
||||
passwordPlain
|
||||
)
|
||||
}
|
||||
|
||||
let userObject: recordTypes.User | undefined;
|
||||
let userObject: recordTypes.User | undefined
|
||||
|
||||
if (isAuthenticated) {
|
||||
const userNameLowerCase = userName.toLowerCase();
|
||||
const userNameLowerCase = userName.toLowerCase()
|
||||
|
||||
const canLogin = configFunctions
|
||||
.getProperty("users.canLogin")
|
||||
.getProperty('users.canLogin')
|
||||
.some((currentUserName) => {
|
||||
return userNameLowerCase === currentUserName.toLowerCase();
|
||||
});
|
||||
return userNameLowerCase === currentUserName.toLowerCase()
|
||||
})
|
||||
|
||||
if (canLogin) {
|
||||
const canUpdate = configFunctions
|
||||
.getProperty("users.canUpdate")
|
||||
.getProperty('users.canUpdate')
|
||||
.some((currentUserName) => {
|
||||
return userNameLowerCase === currentUserName.toLowerCase();
|
||||
});
|
||||
return userNameLowerCase === currentUserName.toLowerCase()
|
||||
})
|
||||
|
||||
const isAdmin = configFunctions
|
||||
.getProperty("users.isAdmin")
|
||||
.getProperty('users.isAdmin')
|
||||
.some((currentUserName) => {
|
||||
return userNameLowerCase === currentUserName.toLowerCase();
|
||||
});
|
||||
return userNameLowerCase === currentUserName.toLowerCase()
|
||||
})
|
||||
|
||||
const apiKey = await getApiKey(userNameLowerCase);
|
||||
const apiKey = await getApiKey(userNameLowerCase)
|
||||
|
||||
userObject = {
|
||||
userName: userNameLowerCase,
|
||||
|
|
@ -98,22 +103,22 @@ router
|
|||
isAdmin,
|
||||
apiKey
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isAuthenticated && userObject) {
|
||||
request.session.user = userObject;
|
||||
request.session.user = userObject
|
||||
|
||||
response.redirect(redirectURL);
|
||||
response.redirect(redirectURL)
|
||||
} else {
|
||||
response.render("login", {
|
||||
response.render('login', {
|
||||
userName,
|
||||
message: "Login Failed",
|
||||
message: 'Login Failed',
|
||||
redirect: redirectURL,
|
||||
useTestDatabases
|
||||
});
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
export default router;
|
||||
export default router
|
||||
|
|
|
|||
|
|
@ -1,48 +1,48 @@
|
|||
import { Router } from "express";
|
||||
import handler_search from "../handlers/lotOccupancies-get/search.js";
|
||||
import handler_doSearchLotOccupancies from "../handlers/lotOccupancies-post/doSearchLotOccupancies.js";
|
||||
import handler_view from "../handlers/lotOccupancies-get/view.js";
|
||||
import handler_new from "../handlers/lotOccupancies-get/new.js";
|
||||
import handler_doGetOccupancyTypeFields from "../handlers/lotOccupancies-post/doGetOccupancyTypeFields.js";
|
||||
import handler_doCreateLotOccupancy from "../handlers/lotOccupancies-post/doCreateLotOccupancy.js";
|
||||
import handler_edit from "../handlers/lotOccupancies-get/edit.js";
|
||||
import handler_doUpdateLotOccupancy from "../handlers/lotOccupancies-post/doUpdateLotOccupancy.js";
|
||||
import handler_doCopyLotOccupancy from "../handlers/lotOccupancies-post/doCopyLotOccupancy.js";
|
||||
import handler_doDeleteLotOccupancy from "../handlers/lotOccupancies-post/doDeleteLotOccupancy.js";
|
||||
import handler_doSearchPastOccupants from "../handlers/lotOccupancies-post/doSearchPastOccupants.js";
|
||||
import handler_doAddLotOccupancyOccupant from "../handlers/lotOccupancies-post/doAddLotOccupancyOccupant.js";
|
||||
import handler_doUpdateLotOccupancyOccupant from "../handlers/lotOccupancies-post/doUpdateLotOccupancyOccupant.js";
|
||||
import handler_doDeleteLotOccupancyOccupant from "../handlers/lotOccupancies-post/doDeleteLotOccupancyOccupant.js";
|
||||
import handler_doAddLotOccupancyComment from "../handlers/lotOccupancies-post/doAddLotOccupancyComment.js";
|
||||
import handler_doUpdateLotOccupancyComment from "../handlers/lotOccupancies-post/doUpdateLotOccupancyComment.js";
|
||||
import handler_doDeleteLotOccupancyComment from "../handlers/lotOccupancies-post/doDeleteLotOccupancyComment.js";
|
||||
import handler_doGetFees from "../handlers/lotOccupancies-post/doGetFees.js";
|
||||
import handler_doAddLotOccupancyFee from "../handlers/lotOccupancies-post/doAddLotOccupancyFee.js";
|
||||
import handler_doDeleteLotOccupancyFee from "../handlers/lotOccupancies-post/doDeleteLotOccupancyFee.js";
|
||||
import handler_doAddLotOccupancyTransaction from "../handlers/lotOccupancies-post/doAddLotOccupancyTransaction.js";
|
||||
import handler_doDeleteLotOccupancyTransaction from "../handlers/lotOccupancies-post/doDeleteLotOccupancyTransaction.js";
|
||||
import * as permissionHandlers from "../handlers/permissions.js";
|
||||
import { Router } from 'express';
|
||||
import handler_search from '../handlers/lotOccupancies-get/search.js';
|
||||
import handler_doSearchLotOccupancies from '../handlers/lotOccupancies-post/doSearchLotOccupancies.js';
|
||||
import handler_view from '../handlers/lotOccupancies-get/view.js';
|
||||
import handler_new from '../handlers/lotOccupancies-get/new.js';
|
||||
import handler_doGetOccupancyTypeFields from '../handlers/lotOccupancies-post/doGetOccupancyTypeFields.js';
|
||||
import handler_doCreateLotOccupancy from '../handlers/lotOccupancies-post/doCreateLotOccupancy.js';
|
||||
import handler_edit from '../handlers/lotOccupancies-get/edit.js';
|
||||
import handler_doUpdateLotOccupancy from '../handlers/lotOccupancies-post/doUpdateLotOccupancy.js';
|
||||
import handler_doCopyLotOccupancy from '../handlers/lotOccupancies-post/doCopyLotOccupancy.js';
|
||||
import handler_doDeleteLotOccupancy from '../handlers/lotOccupancies-post/doDeleteLotOccupancy.js';
|
||||
import handler_doSearchPastOccupants from '../handlers/lotOccupancies-post/doSearchPastOccupants.js';
|
||||
import handler_doAddLotOccupancyOccupant from '../handlers/lotOccupancies-post/doAddLotOccupancyOccupant.js';
|
||||
import handler_doUpdateLotOccupancyOccupant from '../handlers/lotOccupancies-post/doUpdateLotOccupancyOccupant.js';
|
||||
import handler_doDeleteLotOccupancyOccupant from '../handlers/lotOccupancies-post/doDeleteLotOccupancyOccupant.js';
|
||||
import handler_doAddLotOccupancyComment from '../handlers/lotOccupancies-post/doAddLotOccupancyComment.js';
|
||||
import handler_doUpdateLotOccupancyComment from '../handlers/lotOccupancies-post/doUpdateLotOccupancyComment.js';
|
||||
import handler_doDeleteLotOccupancyComment from '../handlers/lotOccupancies-post/doDeleteLotOccupancyComment.js';
|
||||
import handler_doGetFees from '../handlers/lotOccupancies-post/doGetFees.js';
|
||||
import handler_doAddLotOccupancyFee from '../handlers/lotOccupancies-post/doAddLotOccupancyFee.js';
|
||||
import handler_doDeleteLotOccupancyFee from '../handlers/lotOccupancies-post/doDeleteLotOccupancyFee.js';
|
||||
import handler_doAddLotOccupancyTransaction from '../handlers/lotOccupancies-post/doAddLotOccupancyTransaction.js';
|
||||
import handler_doDeleteLotOccupancyTransaction from '../handlers/lotOccupancies-post/doDeleteLotOccupancyTransaction.js';
|
||||
import * as permissionHandlers from '../handlers/permissions.js';
|
||||
export const router = Router();
|
||||
router.get("/", handler_search);
|
||||
router.post("/doSearchLotOccupancies", handler_doSearchLotOccupancies);
|
||||
router.get("/new", permissionHandlers.updateGetHandler, handler_new);
|
||||
router.post("/doGetOccupancyTypeFields", permissionHandlers.updatePostHandler, handler_doGetOccupancyTypeFields);
|
||||
router.post("/doCreateLotOccupancy", permissionHandlers.updatePostHandler, handler_doCreateLotOccupancy);
|
||||
router.get("/:lotOccupancyId", handler_view);
|
||||
router.get("/:lotOccupancyId/edit", permissionHandlers.updateGetHandler, handler_edit);
|
||||
router.post("/doUpdateLotOccupancy", permissionHandlers.updatePostHandler, handler_doUpdateLotOccupancy);
|
||||
router.post("/doCopyLotOccupancy", permissionHandlers.updatePostHandler, handler_doCopyLotOccupancy);
|
||||
router.post("/doDeleteLotOccupancy", permissionHandlers.updatePostHandler, handler_doDeleteLotOccupancy);
|
||||
router.post("/doSearchPastOccupants", permissionHandlers.updatePostHandler, handler_doSearchPastOccupants);
|
||||
router.post("/doAddLotOccupancyOccupant", permissionHandlers.updatePostHandler, handler_doAddLotOccupancyOccupant);
|
||||
router.post("/doUpdateLotOccupancyOccupant", permissionHandlers.updatePostHandler, handler_doUpdateLotOccupancyOccupant);
|
||||
router.post("/doDeleteLotOccupancyOccupant", permissionHandlers.updatePostHandler, handler_doDeleteLotOccupancyOccupant);
|
||||
router.post("/doAddLotOccupancyComment", permissionHandlers.updatePostHandler, handler_doAddLotOccupancyComment);
|
||||
router.post("/doUpdateLotOccupancyComment", permissionHandlers.updatePostHandler, handler_doUpdateLotOccupancyComment);
|
||||
router.post("/doDeleteLotOccupancyComment", permissionHandlers.updatePostHandler, handler_doDeleteLotOccupancyComment);
|
||||
router.post("/doGetFees", permissionHandlers.updatePostHandler, handler_doGetFees);
|
||||
router.post("/doAddLotOccupancyFee", permissionHandlers.updatePostHandler, handler_doAddLotOccupancyFee);
|
||||
router.post("/doDeleteLotOccupancyFee", permissionHandlers.updatePostHandler, handler_doDeleteLotOccupancyFee);
|
||||
router.post("/doAddLotOccupancyTransaction", permissionHandlers.updatePostHandler, handler_doAddLotOccupancyTransaction);
|
||||
router.post("/doDeleteLotOccupancyTransaction", permissionHandlers.updatePostHandler, handler_doDeleteLotOccupancyTransaction);
|
||||
router.get('/', handler_search);
|
||||
router.post('/doSearchLotOccupancies', handler_doSearchLotOccupancies);
|
||||
router.get('/new', permissionHandlers.updateGetHandler, handler_new);
|
||||
router.post('/doGetOccupancyTypeFields', permissionHandlers.updatePostHandler, handler_doGetOccupancyTypeFields);
|
||||
router.post('/doCreateLotOccupancy', permissionHandlers.updatePostHandler, handler_doCreateLotOccupancy);
|
||||
router.get('/:lotOccupancyId', handler_view);
|
||||
router.get('/:lotOccupancyId/edit', permissionHandlers.updateGetHandler, handler_edit);
|
||||
router.post('/doUpdateLotOccupancy', permissionHandlers.updatePostHandler, handler_doUpdateLotOccupancy);
|
||||
router.post('/doCopyLotOccupancy', permissionHandlers.updatePostHandler, handler_doCopyLotOccupancy);
|
||||
router.post('/doDeleteLotOccupancy', permissionHandlers.updatePostHandler, handler_doDeleteLotOccupancy);
|
||||
router.post('/doSearchPastOccupants', permissionHandlers.updatePostHandler, handler_doSearchPastOccupants);
|
||||
router.post('/doAddLotOccupancyOccupant', permissionHandlers.updatePostHandler, handler_doAddLotOccupancyOccupant);
|
||||
router.post('/doUpdateLotOccupancyOccupant', permissionHandlers.updatePostHandler, handler_doUpdateLotOccupancyOccupant);
|
||||
router.post('/doDeleteLotOccupancyOccupant', permissionHandlers.updatePostHandler, handler_doDeleteLotOccupancyOccupant);
|
||||
router.post('/doAddLotOccupancyComment', permissionHandlers.updatePostHandler, handler_doAddLotOccupancyComment);
|
||||
router.post('/doUpdateLotOccupancyComment', permissionHandlers.updatePostHandler, handler_doUpdateLotOccupancyComment);
|
||||
router.post('/doDeleteLotOccupancyComment', permissionHandlers.updatePostHandler, handler_doDeleteLotOccupancyComment);
|
||||
router.post('/doGetFees', permissionHandlers.updatePostHandler, handler_doGetFees);
|
||||
router.post('/doAddLotOccupancyFee', permissionHandlers.updatePostHandler, handler_doAddLotOccupancyFee);
|
||||
router.post('/doDeleteLotOccupancyFee', permissionHandlers.updatePostHandler, handler_doDeleteLotOccupancyFee);
|
||||
router.post('/doAddLotOccupancyTransaction', permissionHandlers.updatePostHandler, handler_doAddLotOccupancyTransaction);
|
||||
router.post('/doDeleteLotOccupancyTransaction', permissionHandlers.updatePostHandler, handler_doDeleteLotOccupancyTransaction);
|
||||
export default router;
|
||||
|
|
|
|||
|
|
@ -1,169 +1,169 @@
|
|||
import { Router } from "express";
|
||||
import { Router } from 'express'
|
||||
|
||||
import handler_search from "../handlers/lotOccupancies-get/search.js";
|
||||
import handler_doSearchLotOccupancies from "../handlers/lotOccupancies-post/doSearchLotOccupancies.js";
|
||||
import handler_search from '../handlers/lotOccupancies-get/search.js'
|
||||
import handler_doSearchLotOccupancies from '../handlers/lotOccupancies-post/doSearchLotOccupancies.js'
|
||||
|
||||
import handler_view from "../handlers/lotOccupancies-get/view.js";
|
||||
import handler_view from '../handlers/lotOccupancies-get/view.js'
|
||||
|
||||
import handler_new from "../handlers/lotOccupancies-get/new.js";
|
||||
import handler_doGetOccupancyTypeFields from "../handlers/lotOccupancies-post/doGetOccupancyTypeFields.js";
|
||||
import handler_doCreateLotOccupancy from "../handlers/lotOccupancies-post/doCreateLotOccupancy.js";
|
||||
import handler_new from '../handlers/lotOccupancies-get/new.js'
|
||||
import handler_doGetOccupancyTypeFields from '../handlers/lotOccupancies-post/doGetOccupancyTypeFields.js'
|
||||
import handler_doCreateLotOccupancy from '../handlers/lotOccupancies-post/doCreateLotOccupancy.js'
|
||||
|
||||
import handler_edit from "../handlers/lotOccupancies-get/edit.js";
|
||||
import handler_doUpdateLotOccupancy from "../handlers/lotOccupancies-post/doUpdateLotOccupancy.js";
|
||||
import handler_doCopyLotOccupancy from "../handlers/lotOccupancies-post/doCopyLotOccupancy.js";
|
||||
import handler_doDeleteLotOccupancy from "../handlers/lotOccupancies-post/doDeleteLotOccupancy.js";
|
||||
import handler_edit from '../handlers/lotOccupancies-get/edit.js'
|
||||
import handler_doUpdateLotOccupancy from '../handlers/lotOccupancies-post/doUpdateLotOccupancy.js'
|
||||
import handler_doCopyLotOccupancy from '../handlers/lotOccupancies-post/doCopyLotOccupancy.js'
|
||||
import handler_doDeleteLotOccupancy from '../handlers/lotOccupancies-post/doDeleteLotOccupancy.js'
|
||||
|
||||
import handler_doSearchPastOccupants from "../handlers/lotOccupancies-post/doSearchPastOccupants.js";
|
||||
import handler_doAddLotOccupancyOccupant from "../handlers/lotOccupancies-post/doAddLotOccupancyOccupant.js";
|
||||
import handler_doUpdateLotOccupancyOccupant from "../handlers/lotOccupancies-post/doUpdateLotOccupancyOccupant.js";
|
||||
import handler_doDeleteLotOccupancyOccupant from "../handlers/lotOccupancies-post/doDeleteLotOccupancyOccupant.js";
|
||||
import handler_doSearchPastOccupants from '../handlers/lotOccupancies-post/doSearchPastOccupants.js'
|
||||
import handler_doAddLotOccupancyOccupant from '../handlers/lotOccupancies-post/doAddLotOccupancyOccupant.js'
|
||||
import handler_doUpdateLotOccupancyOccupant from '../handlers/lotOccupancies-post/doUpdateLotOccupancyOccupant.js'
|
||||
import handler_doDeleteLotOccupancyOccupant from '../handlers/lotOccupancies-post/doDeleteLotOccupancyOccupant.js'
|
||||
|
||||
import handler_doAddLotOccupancyComment from "../handlers/lotOccupancies-post/doAddLotOccupancyComment.js";
|
||||
import handler_doUpdateLotOccupancyComment from "../handlers/lotOccupancies-post/doUpdateLotOccupancyComment.js";
|
||||
import handler_doDeleteLotOccupancyComment from "../handlers/lotOccupancies-post/doDeleteLotOccupancyComment.js";
|
||||
import handler_doAddLotOccupancyComment from '../handlers/lotOccupancies-post/doAddLotOccupancyComment.js'
|
||||
import handler_doUpdateLotOccupancyComment from '../handlers/lotOccupancies-post/doUpdateLotOccupancyComment.js'
|
||||
import handler_doDeleteLotOccupancyComment from '../handlers/lotOccupancies-post/doDeleteLotOccupancyComment.js'
|
||||
|
||||
import handler_doGetFees from "../handlers/lotOccupancies-post/doGetFees.js";
|
||||
import handler_doAddLotOccupancyFee from "../handlers/lotOccupancies-post/doAddLotOccupancyFee.js";
|
||||
import handler_doDeleteLotOccupancyFee from "../handlers/lotOccupancies-post/doDeleteLotOccupancyFee.js";
|
||||
import handler_doGetFees from '../handlers/lotOccupancies-post/doGetFees.js'
|
||||
import handler_doAddLotOccupancyFee from '../handlers/lotOccupancies-post/doAddLotOccupancyFee.js'
|
||||
import handler_doDeleteLotOccupancyFee from '../handlers/lotOccupancies-post/doDeleteLotOccupancyFee.js'
|
||||
|
||||
import handler_doAddLotOccupancyTransaction from "../handlers/lotOccupancies-post/doAddLotOccupancyTransaction.js";
|
||||
import handler_doDeleteLotOccupancyTransaction from "../handlers/lotOccupancies-post/doDeleteLotOccupancyTransaction.js";
|
||||
import handler_doAddLotOccupancyTransaction from '../handlers/lotOccupancies-post/doAddLotOccupancyTransaction.js'
|
||||
import handler_doDeleteLotOccupancyTransaction from '../handlers/lotOccupancies-post/doDeleteLotOccupancyTransaction.js'
|
||||
|
||||
import * as permissionHandlers from "../handlers/permissions.js";
|
||||
import * as permissionHandlers from '../handlers/permissions.js'
|
||||
|
||||
export const router = Router();
|
||||
export const router = Router()
|
||||
|
||||
// Search
|
||||
|
||||
router.get("/", handler_search);
|
||||
router.get('/', handler_search)
|
||||
|
||||
router.post("/doSearchLotOccupancies", handler_doSearchLotOccupancies);
|
||||
router.post('/doSearchLotOccupancies', handler_doSearchLotOccupancies)
|
||||
|
||||
// Create
|
||||
|
||||
router.get("/new", permissionHandlers.updateGetHandler, handler_new);
|
||||
router.get('/new', permissionHandlers.updateGetHandler, handler_new)
|
||||
|
||||
router.post(
|
||||
"/doGetOccupancyTypeFields",
|
||||
'/doGetOccupancyTypeFields',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doGetOccupancyTypeFields
|
||||
);
|
||||
)
|
||||
|
||||
router.post(
|
||||
"/doCreateLotOccupancy",
|
||||
'/doCreateLotOccupancy',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doCreateLotOccupancy
|
||||
);
|
||||
)
|
||||
|
||||
// View
|
||||
|
||||
router.get("/:lotOccupancyId", handler_view);
|
||||
router.get('/:lotOccupancyId', handler_view)
|
||||
|
||||
// Edit
|
||||
|
||||
router.get(
|
||||
"/:lotOccupancyId/edit",
|
||||
'/:lotOccupancyId/edit',
|
||||
permissionHandlers.updateGetHandler,
|
||||
handler_edit
|
||||
);
|
||||
)
|
||||
|
||||
router.post(
|
||||
"/doUpdateLotOccupancy",
|
||||
'/doUpdateLotOccupancy',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doUpdateLotOccupancy
|
||||
);
|
||||
)
|
||||
|
||||
router.post(
|
||||
"/doCopyLotOccupancy",
|
||||
'/doCopyLotOccupancy',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doCopyLotOccupancy
|
||||
);
|
||||
)
|
||||
|
||||
router.post(
|
||||
"/doDeleteLotOccupancy",
|
||||
'/doDeleteLotOccupancy',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doDeleteLotOccupancy
|
||||
);
|
||||
)
|
||||
|
||||
// Occupants
|
||||
|
||||
router.post(
|
||||
"/doSearchPastOccupants",
|
||||
'/doSearchPastOccupants',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doSearchPastOccupants
|
||||
);
|
||||
)
|
||||
|
||||
router.post(
|
||||
"/doAddLotOccupancyOccupant",
|
||||
'/doAddLotOccupancyOccupant',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doAddLotOccupancyOccupant
|
||||
);
|
||||
)
|
||||
|
||||
router.post(
|
||||
"/doUpdateLotOccupancyOccupant",
|
||||
'/doUpdateLotOccupancyOccupant',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doUpdateLotOccupancyOccupant
|
||||
);
|
||||
)
|
||||
|
||||
router.post(
|
||||
"/doDeleteLotOccupancyOccupant",
|
||||
'/doDeleteLotOccupancyOccupant',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doDeleteLotOccupancyOccupant
|
||||
);
|
||||
)
|
||||
|
||||
// Comments
|
||||
|
||||
router.post(
|
||||
"/doAddLotOccupancyComment",
|
||||
'/doAddLotOccupancyComment',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doAddLotOccupancyComment
|
||||
);
|
||||
)
|
||||
|
||||
router.post(
|
||||
"/doUpdateLotOccupancyComment",
|
||||
'/doUpdateLotOccupancyComment',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doUpdateLotOccupancyComment
|
||||
);
|
||||
)
|
||||
|
||||
router.post(
|
||||
"/doDeleteLotOccupancyComment",
|
||||
'/doDeleteLotOccupancyComment',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doDeleteLotOccupancyComment
|
||||
);
|
||||
)
|
||||
|
||||
// Fees
|
||||
|
||||
router.post(
|
||||
"/doGetFees",
|
||||
'/doGetFees',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doGetFees
|
||||
);
|
||||
)
|
||||
|
||||
router.post(
|
||||
"/doAddLotOccupancyFee",
|
||||
'/doAddLotOccupancyFee',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doAddLotOccupancyFee
|
||||
);
|
||||
)
|
||||
|
||||
router.post(
|
||||
"/doDeleteLotOccupancyFee",
|
||||
'/doDeleteLotOccupancyFee',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doDeleteLotOccupancyFee
|
||||
);
|
||||
)
|
||||
|
||||
// Transactions
|
||||
|
||||
router.post(
|
||||
"/doAddLotOccupancyTransaction",
|
||||
'/doAddLotOccupancyTransaction',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doAddLotOccupancyTransaction
|
||||
);
|
||||
)
|
||||
|
||||
router.post(
|
||||
"/doDeleteLotOccupancyTransaction",
|
||||
'/doDeleteLotOccupancyTransaction',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doDeleteLotOccupancyTransaction
|
||||
);
|
||||
)
|
||||
|
||||
export default router;
|
||||
export default router
|
||||
|
|
|
|||
|
|
@ -1,32 +1,32 @@
|
|||
import { Router } from "express";
|
||||
import * as permissionHandlers from "../handlers/permissions.js";
|
||||
import handler_search from "../handlers/lots-get/search.js";
|
||||
import handler_doSearchLots from "../handlers/lots-post/doSearchLots.js";
|
||||
import handler_view from "../handlers/lots-get/view.js";
|
||||
import handler_next from "../handlers/lots-get/next.js";
|
||||
import handler_previous from "../handlers/lots-get/previous.js";
|
||||
import handler_new from "../handlers/lots-get/new.js";
|
||||
import handler_edit from "../handlers/lots-get/edit.js";
|
||||
import handler_doGetLotTypeFields from "../handlers/lots-post/doGetLotTypeFields.js";
|
||||
import handler_doCreateLot from "../handlers/lots-post/doCreateLot.js";
|
||||
import handler_doUpdateLot from "../handlers/lots-post/doUpdateLot.js";
|
||||
import handler_doDeleteLot from "../handlers/lots-post/doDeleteLot.js";
|
||||
import handler_doAddLotComment from "../handlers/lots-post/doAddLotComment.js";
|
||||
import handler_doUpdateLotComment from "../handlers/lots-post/doUpdateLotComment.js";
|
||||
import handler_doDeleteLotComment from "../handlers/lots-post/doDeleteLotComment.js";
|
||||
import { Router } from 'express';
|
||||
import * as permissionHandlers from '../handlers/permissions.js';
|
||||
import handler_search from '../handlers/lots-get/search.js';
|
||||
import handler_doSearchLots from '../handlers/lots-post/doSearchLots.js';
|
||||
import handler_view from '../handlers/lots-get/view.js';
|
||||
import handler_next from '../handlers/lots-get/next.js';
|
||||
import handler_previous from '../handlers/lots-get/previous.js';
|
||||
import handler_new from '../handlers/lots-get/new.js';
|
||||
import handler_edit from '../handlers/lots-get/edit.js';
|
||||
import handler_doGetLotTypeFields from '../handlers/lots-post/doGetLotTypeFields.js';
|
||||
import handler_doCreateLot from '../handlers/lots-post/doCreateLot.js';
|
||||
import handler_doUpdateLot from '../handlers/lots-post/doUpdateLot.js';
|
||||
import handler_doDeleteLot from '../handlers/lots-post/doDeleteLot.js';
|
||||
import handler_doAddLotComment from '../handlers/lots-post/doAddLotComment.js';
|
||||
import handler_doUpdateLotComment from '../handlers/lots-post/doUpdateLotComment.js';
|
||||
import handler_doDeleteLotComment from '../handlers/lots-post/doDeleteLotComment.js';
|
||||
export const router = Router();
|
||||
router.get("/", handler_search);
|
||||
router.post("/doSearchLots", handler_doSearchLots);
|
||||
router.get("/new", permissionHandlers.updateGetHandler, handler_new);
|
||||
router.get("/:lotId", handler_view);
|
||||
router.get("/:lotId/next", handler_next);
|
||||
router.get("/:lotId/previous", handler_previous);
|
||||
router.get("/:lotId/edit", permissionHandlers.updateGetHandler, handler_edit);
|
||||
router.post("/doGetLotTypeFields", permissionHandlers.updatePostHandler, handler_doGetLotTypeFields);
|
||||
router.post("/doCreateLot", permissionHandlers.updatePostHandler, handler_doCreateLot);
|
||||
router.post("/doUpdateLot", permissionHandlers.updatePostHandler, handler_doUpdateLot);
|
||||
router.post("/doDeleteLot", permissionHandlers.updatePostHandler, handler_doDeleteLot);
|
||||
router.post("/doAddLotComment", permissionHandlers.updatePostHandler, handler_doAddLotComment);
|
||||
router.post("/doUpdateLotComment", permissionHandlers.updatePostHandler, handler_doUpdateLotComment);
|
||||
router.post("/doDeleteLotComment", permissionHandlers.updatePostHandler, handler_doDeleteLotComment);
|
||||
router.get('/', handler_search);
|
||||
router.post('/doSearchLots', handler_doSearchLots);
|
||||
router.get('/new', permissionHandlers.updateGetHandler, handler_new);
|
||||
router.get('/:lotId', handler_view);
|
||||
router.get('/:lotId/next', handler_next);
|
||||
router.get('/:lotId/previous', handler_previous);
|
||||
router.get('/:lotId/edit', permissionHandlers.updateGetHandler, handler_edit);
|
||||
router.post('/doGetLotTypeFields', permissionHandlers.updatePostHandler, handler_doGetLotTypeFields);
|
||||
router.post('/doCreateLot', permissionHandlers.updatePostHandler, handler_doCreateLot);
|
||||
router.post('/doUpdateLot', permissionHandlers.updatePostHandler, handler_doUpdateLot);
|
||||
router.post('/doDeleteLot', permissionHandlers.updatePostHandler, handler_doDeleteLot);
|
||||
router.post('/doAddLotComment', permissionHandlers.updatePostHandler, handler_doAddLotComment);
|
||||
router.post('/doUpdateLotComment', permissionHandlers.updatePostHandler, handler_doUpdateLotComment);
|
||||
router.post('/doDeleteLotComment', permissionHandlers.updatePostHandler, handler_doDeleteLotComment);
|
||||
export default router;
|
||||
|
|
|
|||
|
|
@ -1,71 +1,91 @@
|
|||
import { Router } from "express";
|
||||
import { Router } from 'express'
|
||||
|
||||
import * as permissionHandlers from "../handlers/permissions.js";
|
||||
import * as permissionHandlers from '../handlers/permissions.js'
|
||||
|
||||
import handler_search from "../handlers/lots-get/search.js";
|
||||
import handler_doSearchLots from "../handlers/lots-post/doSearchLots.js";
|
||||
import handler_search from '../handlers/lots-get/search.js'
|
||||
import handler_doSearchLots from '../handlers/lots-post/doSearchLots.js'
|
||||
|
||||
import handler_view from "../handlers/lots-get/view.js";
|
||||
import handler_next from "../handlers/lots-get/next.js";
|
||||
import handler_previous from "../handlers/lots-get/previous.js";
|
||||
import handler_view from '../handlers/lots-get/view.js'
|
||||
import handler_next from '../handlers/lots-get/next.js'
|
||||
import handler_previous from '../handlers/lots-get/previous.js'
|
||||
|
||||
import handler_new from "../handlers/lots-get/new.js";
|
||||
import handler_edit from "../handlers/lots-get/edit.js";
|
||||
import handler_new from '../handlers/lots-get/new.js'
|
||||
import handler_edit from '../handlers/lots-get/edit.js'
|
||||
|
||||
import handler_doGetLotTypeFields from "../handlers/lots-post/doGetLotTypeFields.js";
|
||||
import handler_doGetLotTypeFields from '../handlers/lots-post/doGetLotTypeFields.js'
|
||||
|
||||
import handler_doCreateLot from "../handlers/lots-post/doCreateLot.js";
|
||||
import handler_doUpdateLot from "../handlers/lots-post/doUpdateLot.js";
|
||||
import handler_doDeleteLot from "../handlers/lots-post/doDeleteLot.js";
|
||||
import handler_doCreateLot from '../handlers/lots-post/doCreateLot.js'
|
||||
import handler_doUpdateLot from '../handlers/lots-post/doUpdateLot.js'
|
||||
import handler_doDeleteLot from '../handlers/lots-post/doDeleteLot.js'
|
||||
|
||||
import handler_doAddLotComment from "../handlers/lots-post/doAddLotComment.js";
|
||||
import handler_doUpdateLotComment from "../handlers/lots-post/doUpdateLotComment.js";
|
||||
import handler_doDeleteLotComment from "../handlers/lots-post/doDeleteLotComment.js";
|
||||
import handler_doAddLotComment from '../handlers/lots-post/doAddLotComment.js'
|
||||
import handler_doUpdateLotComment from '../handlers/lots-post/doUpdateLotComment.js'
|
||||
import handler_doDeleteLotComment from '../handlers/lots-post/doDeleteLotComment.js'
|
||||
|
||||
export const router = Router();
|
||||
export const router = Router()
|
||||
|
||||
/*
|
||||
* Lot Search
|
||||
*/
|
||||
|
||||
router.get("/", handler_search);
|
||||
router.get('/', handler_search)
|
||||
|
||||
router.post("/doSearchLots", handler_doSearchLots);
|
||||
router.post('/doSearchLots', handler_doSearchLots)
|
||||
|
||||
/*
|
||||
* Lot View / Edit
|
||||
*/
|
||||
|
||||
router.get("/new", permissionHandlers.updateGetHandler, handler_new);
|
||||
router.get('/new', permissionHandlers.updateGetHandler, handler_new)
|
||||
|
||||
router.get("/:lotId", handler_view);
|
||||
router.get('/:lotId', handler_view)
|
||||
|
||||
router.get("/:lotId/next", handler_next);
|
||||
router.get('/:lotId/next', handler_next)
|
||||
|
||||
router.get("/:lotId/previous", handler_previous);
|
||||
router.get('/:lotId/previous', handler_previous)
|
||||
|
||||
router.get("/:lotId/edit", permissionHandlers.updateGetHandler, handler_edit);
|
||||
|
||||
router.post("/doGetLotTypeFields", permissionHandlers.updatePostHandler, handler_doGetLotTypeFields);
|
||||
|
||||
router.post("/doCreateLot", permissionHandlers.updatePostHandler, handler_doCreateLot);
|
||||
|
||||
router.post("/doUpdateLot", permissionHandlers.updatePostHandler, handler_doUpdateLot);
|
||||
|
||||
router.post("/doDeleteLot", permissionHandlers.updatePostHandler, handler_doDeleteLot);
|
||||
|
||||
router.post("/doAddLotComment", permissionHandlers.updatePostHandler, handler_doAddLotComment);
|
||||
router.get('/:lotId/edit', permissionHandlers.updateGetHandler, handler_edit)
|
||||
|
||||
router.post(
|
||||
"/doUpdateLotComment",
|
||||
'/doGetLotTypeFields',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doGetLotTypeFields
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doCreateLot',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doCreateLot
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doUpdateLot',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doUpdateLot
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doDeleteLot',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doDeleteLot
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doAddLotComment',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doAddLotComment
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doUpdateLotComment',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doUpdateLotComment
|
||||
);
|
||||
)
|
||||
|
||||
router.post(
|
||||
"/doDeleteLotComment",
|
||||
'/doDeleteLotComment',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doDeleteLotComment
|
||||
);
|
||||
)
|
||||
|
||||
export default router;
|
||||
export default router
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
import { Router } from "express";
|
||||
import * as permissionHandlers from "../handlers/permissions.js";
|
||||
import handler_search from "../handlers/maps-get/search.js";
|
||||
import handler_view from "../handlers/maps-get/view.js";
|
||||
import handler_new from "../handlers/maps-get/new.js";
|
||||
import handler_edit from "../handlers/maps-get/edit.js";
|
||||
import handler_doCreateMap from "../handlers/maps-post/doCreateMap.js";
|
||||
import handler_doUpdateMap from "../handlers/maps-post/doUpdateMap.js";
|
||||
import handler_doDeleteMap from "../handlers/maps-post/doDeleteMap.js";
|
||||
import { Router } from 'express';
|
||||
import * as permissionHandlers from '../handlers/permissions.js';
|
||||
import handler_search from '../handlers/maps-get/search.js';
|
||||
import handler_view from '../handlers/maps-get/view.js';
|
||||
import handler_new from '../handlers/maps-get/new.js';
|
||||
import handler_edit from '../handlers/maps-get/edit.js';
|
||||
import handler_doCreateMap from '../handlers/maps-post/doCreateMap.js';
|
||||
import handler_doUpdateMap from '../handlers/maps-post/doUpdateMap.js';
|
||||
import handler_doDeleteMap from '../handlers/maps-post/doDeleteMap.js';
|
||||
export const router = Router();
|
||||
router.get("/", handler_search);
|
||||
router.get("/new", permissionHandlers.updateGetHandler, handler_new);
|
||||
router.get("/:mapId", handler_view);
|
||||
router.get("/:mapId/edit", permissionHandlers.updateGetHandler, handler_edit);
|
||||
router.post("/doCreateMap", permissionHandlers.updatePostHandler, handler_doCreateMap);
|
||||
router.post("/doUpdateMap", permissionHandlers.updatePostHandler, handler_doUpdateMap);
|
||||
router.post("/doDeleteMap", permissionHandlers.updatePostHandler, handler_doDeleteMap);
|
||||
router.get('/', handler_search);
|
||||
router.get('/new', permissionHandlers.updateGetHandler, handler_new);
|
||||
router.get('/:mapId', handler_view);
|
||||
router.get('/:mapId/edit', permissionHandlers.updateGetHandler, handler_edit);
|
||||
router.post('/doCreateMap', permissionHandlers.updatePostHandler, handler_doCreateMap);
|
||||
router.post('/doUpdateMap', permissionHandlers.updatePostHandler, handler_doUpdateMap);
|
||||
router.post('/doDeleteMap', permissionHandlers.updatePostHandler, handler_doDeleteMap);
|
||||
export default router;
|
||||
|
|
|
|||
|
|
@ -1,43 +1,43 @@
|
|||
import { Router } from "express";
|
||||
import { Router } from 'express'
|
||||
|
||||
import * as permissionHandlers from "../handlers/permissions.js";
|
||||
import * as permissionHandlers from '../handlers/permissions.js'
|
||||
|
||||
import handler_search from "../handlers/maps-get/search.js";
|
||||
import handler_search from '../handlers/maps-get/search.js'
|
||||
|
||||
import handler_view from "../handlers/maps-get/view.js";
|
||||
import handler_new from "../handlers/maps-get/new.js";
|
||||
import handler_edit from "../handlers/maps-get/edit.js";
|
||||
import handler_view from '../handlers/maps-get/view.js'
|
||||
import handler_new from '../handlers/maps-get/new.js'
|
||||
import handler_edit from '../handlers/maps-get/edit.js'
|
||||
|
||||
import handler_doCreateMap from "../handlers/maps-post/doCreateMap.js";
|
||||
import handler_doUpdateMap from "../handlers/maps-post/doUpdateMap.js";
|
||||
import handler_doDeleteMap from "../handlers/maps-post/doDeleteMap.js";
|
||||
import handler_doCreateMap from '../handlers/maps-post/doCreateMap.js'
|
||||
import handler_doUpdateMap from '../handlers/maps-post/doUpdateMap.js'
|
||||
import handler_doDeleteMap from '../handlers/maps-post/doDeleteMap.js'
|
||||
|
||||
export const router = Router();
|
||||
export const router = Router()
|
||||
|
||||
router.get("/", handler_search);
|
||||
router.get('/', handler_search)
|
||||
|
||||
router.get("/new", permissionHandlers.updateGetHandler, handler_new);
|
||||
router.get('/new', permissionHandlers.updateGetHandler, handler_new)
|
||||
|
||||
router.get("/:mapId", handler_view);
|
||||
router.get('/:mapId', handler_view)
|
||||
|
||||
router.get("/:mapId/edit", permissionHandlers.updateGetHandler, handler_edit);
|
||||
router.get('/:mapId/edit', permissionHandlers.updateGetHandler, handler_edit)
|
||||
|
||||
router.post(
|
||||
"/doCreateMap",
|
||||
'/doCreateMap',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doCreateMap
|
||||
);
|
||||
)
|
||||
|
||||
router.post(
|
||||
"/doUpdateMap",
|
||||
'/doUpdateMap',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doUpdateMap
|
||||
);
|
||||
)
|
||||
|
||||
router.post(
|
||||
"/doDeleteMap",
|
||||
'/doDeleteMap',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doDeleteMap
|
||||
);
|
||||
)
|
||||
|
||||
export default router;
|
||||
export default router
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Router } from "express";
|
||||
import handler_screen from "../handlers/print-get/screen.js";
|
||||
import handler_pdf from "../handlers/print-get/pdf.js";
|
||||
import { Router } from 'express';
|
||||
import handler_screen from '../handlers/print-get/screen.js';
|
||||
import handler_pdf from '../handlers/print-get/pdf.js';
|
||||
export const router = Router();
|
||||
router.get("/screen/:printName", handler_screen);
|
||||
router.get("/pdf/:printName", handler_pdf);
|
||||
router.get('/screen/:printName', handler_screen);
|
||||
router.get('/pdf/:printName', handler_pdf);
|
||||
export default router;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import { Router } from "express";
|
||||
import { Router } from 'express'
|
||||
|
||||
import handler_screen from "../handlers/print-get/screen.js";
|
||||
import handler_pdf from "../handlers/print-get/pdf.js";
|
||||
import handler_screen from '../handlers/print-get/screen.js'
|
||||
import handler_pdf from '../handlers/print-get/pdf.js'
|
||||
|
||||
export const router = Router();
|
||||
export const router = Router()
|
||||
|
||||
router.get("/screen/:printName", handler_screen);
|
||||
router.get('/screen/:printName', handler_screen)
|
||||
|
||||
router.get("/pdf/:printName", handler_pdf);
|
||||
router.get('/pdf/:printName', handler_pdf)
|
||||
|
||||
export default router;
|
||||
export default router
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Router } from "express";
|
||||
import handler_search from "../handlers/reports-get/search.js";
|
||||
import handler_reportName from "../handlers/reports-get/reportName.js";
|
||||
import { Router } from 'express';
|
||||
import handler_search from '../handlers/reports-get/search.js';
|
||||
import handler_reportName from '../handlers/reports-get/reportName.js';
|
||||
export const router = Router();
|
||||
router.get("/", handler_search);
|
||||
router.all("/:reportName", handler_reportName);
|
||||
router.get('/', handler_search);
|
||||
router.all('/:reportName', handler_reportName);
|
||||
export default router;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import { Router } from "express";
|
||||
import { Router } from 'express'
|
||||
|
||||
import handler_search from "../handlers/reports-get/search.js";
|
||||
import handler_reportName from "../handlers/reports-get/reportName.js";
|
||||
import handler_search from '../handlers/reports-get/search.js'
|
||||
import handler_reportName from '../handlers/reports-get/reportName.js'
|
||||
|
||||
export const router = Router();
|
||||
export const router = Router()
|
||||
|
||||
router.get("/", handler_search);
|
||||
router.get('/', handler_search)
|
||||
|
||||
router.all("/:reportName", handler_reportName);
|
||||
router.all('/:reportName', handler_reportName)
|
||||
|
||||
export default router;
|
||||
export default router
|
||||
|
|
|
|||
|
|
@ -1,56 +1,56 @@
|
|||
import { Router } from "express";
|
||||
import * as permissionHandlers from "../handlers/permissions.js";
|
||||
import handler_search from "../handlers/workOrders-get/search.js";
|
||||
import handler_doSearchWorkOrders from "../handlers/workOrders-post/doSearchWorkOrders.js";
|
||||
import handler_milestoneCalendar from "../handlers/workOrders-get/milestoneCalendar.js";
|
||||
import handler_doGetWorkOrderMilestones from "../handlers/workOrders-post/doGetWorkOrderMilestones.js";
|
||||
import handler_outlook from "../handlers/workOrders-get/outlook.js";
|
||||
import handler_view from "../handlers/workOrders-get/view.js";
|
||||
import handler_doReopenWorkOrder from "../handlers/workOrders-post/doReopenWorkOrder.js";
|
||||
import handler_new from "../handlers/workOrders-get/new.js";
|
||||
import handler_doCreateWorkOrder from "../handlers/workOrders-post/doCreateWorkOrder.js";
|
||||
import handler_edit from "../handlers/workOrders-get/edit.js";
|
||||
import handler_doUpdateWorkOrder from "../handlers/workOrders-post/doUpdateWorkOrder.js";
|
||||
import handler_doCloseWorkOrder from "../handlers/workOrders-post/doCloseWorkOrder.js";
|
||||
import handler_doDeleteWorkOrder from "../handlers/workOrders-post/doDeleteWorkOrder.js";
|
||||
import handler_doAddWorkOrderLotOccupancy from "../handlers/workOrders-post/doAddWorkOrderLotOccupancy.js";
|
||||
import handler_doDeleteWorkOrderLotOccupancy from "../handlers/workOrders-post/doDeleteWorkOrderLotOccupancy.js";
|
||||
import handler_doAddWorkOrderLot from "../handlers/workOrders-post/doAddWorkOrderLot.js";
|
||||
import handler_doUpdateLotStatus from "../handlers/workOrders-post/doUpdateLotStatus.js";
|
||||
import handler_doDeleteWorkOrderLot from "../handlers/workOrders-post/doDeleteWorkOrderLot.js";
|
||||
import handler_doAddWorkOrderComment from "../handlers/workOrders-post/doAddWorkOrderComment.js";
|
||||
import handler_doUpdateWorkOrderComment from "../handlers/workOrders-post/doUpdateWorkOrderComment.js";
|
||||
import handler_doDeleteWorkOrderComment from "../handlers/workOrders-post/doDeleteWorkOrderComment.js";
|
||||
import handler_doAddWorkOrderMilestone from "../handlers/workOrders-post/doAddWorkOrderMilestone.js";
|
||||
import handler_doUpdateWorkOrderMilestone from "../handlers/workOrders-post/doUpdateWorkOrderMilestone.js";
|
||||
import handler_doCompleteWorkOrderMilestone from "../handlers/workOrders-post/doCompleteWorkOrderMilestone.js";
|
||||
import handler_doReopenWorkOrderMilestone from "../handlers/workOrders-post/doReopenWorkOrderMilestone.js";
|
||||
import handler_doDeleteWorkOrderMilestone from "../handlers/workOrders-post/doDeleteWorkOrderMilestone.js";
|
||||
import { Router } from 'express';
|
||||
import * as permissionHandlers from '../handlers/permissions.js';
|
||||
import handler_search from '../handlers/workOrders-get/search.js';
|
||||
import handler_doSearchWorkOrders from '../handlers/workOrders-post/doSearchWorkOrders.js';
|
||||
import handler_milestoneCalendar from '../handlers/workOrders-get/milestoneCalendar.js';
|
||||
import handler_doGetWorkOrderMilestones from '../handlers/workOrders-post/doGetWorkOrderMilestones.js';
|
||||
import handler_outlook from '../handlers/workOrders-get/outlook.js';
|
||||
import handler_view from '../handlers/workOrders-get/view.js';
|
||||
import handler_doReopenWorkOrder from '../handlers/workOrders-post/doReopenWorkOrder.js';
|
||||
import handler_new from '../handlers/workOrders-get/new.js';
|
||||
import handler_doCreateWorkOrder from '../handlers/workOrders-post/doCreateWorkOrder.js';
|
||||
import handler_edit from '../handlers/workOrders-get/edit.js';
|
||||
import handler_doUpdateWorkOrder from '../handlers/workOrders-post/doUpdateWorkOrder.js';
|
||||
import handler_doCloseWorkOrder from '../handlers/workOrders-post/doCloseWorkOrder.js';
|
||||
import handler_doDeleteWorkOrder from '../handlers/workOrders-post/doDeleteWorkOrder.js';
|
||||
import handler_doAddWorkOrderLotOccupancy from '../handlers/workOrders-post/doAddWorkOrderLotOccupancy.js';
|
||||
import handler_doDeleteWorkOrderLotOccupancy from '../handlers/workOrders-post/doDeleteWorkOrderLotOccupancy.js';
|
||||
import handler_doAddWorkOrderLot from '../handlers/workOrders-post/doAddWorkOrderLot.js';
|
||||
import handler_doUpdateLotStatus from '../handlers/workOrders-post/doUpdateLotStatus.js';
|
||||
import handler_doDeleteWorkOrderLot from '../handlers/workOrders-post/doDeleteWorkOrderLot.js';
|
||||
import handler_doAddWorkOrderComment from '../handlers/workOrders-post/doAddWorkOrderComment.js';
|
||||
import handler_doUpdateWorkOrderComment from '../handlers/workOrders-post/doUpdateWorkOrderComment.js';
|
||||
import handler_doDeleteWorkOrderComment from '../handlers/workOrders-post/doDeleteWorkOrderComment.js';
|
||||
import handler_doAddWorkOrderMilestone from '../handlers/workOrders-post/doAddWorkOrderMilestone.js';
|
||||
import handler_doUpdateWorkOrderMilestone from '../handlers/workOrders-post/doUpdateWorkOrderMilestone.js';
|
||||
import handler_doCompleteWorkOrderMilestone from '../handlers/workOrders-post/doCompleteWorkOrderMilestone.js';
|
||||
import handler_doReopenWorkOrderMilestone from '../handlers/workOrders-post/doReopenWorkOrderMilestone.js';
|
||||
import handler_doDeleteWorkOrderMilestone from '../handlers/workOrders-post/doDeleteWorkOrderMilestone.js';
|
||||
export const router = Router();
|
||||
router.get("/", handler_search);
|
||||
router.post("/doSearchWorkOrders", handler_doSearchWorkOrders);
|
||||
router.get("/milestoneCalendar", handler_milestoneCalendar);
|
||||
router.post("/doGetWorkOrderMilestones", handler_doGetWorkOrderMilestones);
|
||||
router.get("/outlook", handler_outlook);
|
||||
router.get("/new", permissionHandlers.adminGetHandler, handler_new);
|
||||
router.post("/doCreateWorkOrder", permissionHandlers.updatePostHandler, handler_doCreateWorkOrder);
|
||||
router.get("/:workOrderId", handler_view);
|
||||
router.post("/doReopenWorkOrder", permissionHandlers.updatePostHandler, handler_doReopenWorkOrder);
|
||||
router.get("/:workOrderId/edit", permissionHandlers.updateGetHandler, handler_edit);
|
||||
router.post("/doUpdateWorkOrder", permissionHandlers.updatePostHandler, handler_doUpdateWorkOrder);
|
||||
router.post("/doCloseWorkOrder", permissionHandlers.updatePostHandler, handler_doCloseWorkOrder);
|
||||
router.post("/doDeleteWorkOrder", permissionHandlers.updatePostHandler, handler_doDeleteWorkOrder);
|
||||
router.post("/doAddWorkOrderLotOccupancy", permissionHandlers.updatePostHandler, handler_doAddWorkOrderLotOccupancy);
|
||||
router.post("/doDeleteWorkOrderLotOccupancy", permissionHandlers.updatePostHandler, handler_doDeleteWorkOrderLotOccupancy);
|
||||
router.post("/doAddWorkOrderLot", permissionHandlers.updatePostHandler, handler_doAddWorkOrderLot);
|
||||
router.post("/doUpdateLotStatus", permissionHandlers.updatePostHandler, handler_doUpdateLotStatus);
|
||||
router.post("/doDeleteWorkOrderLot", permissionHandlers.updatePostHandler, handler_doDeleteWorkOrderLot);
|
||||
router.post("/doAddWorkOrderComment", permissionHandlers.updatePostHandler, handler_doAddWorkOrderComment);
|
||||
router.post("/doUpdateWorkOrderComment", permissionHandlers.updatePostHandler, handler_doUpdateWorkOrderComment);
|
||||
router.post("/doDeleteWorkOrderComment", permissionHandlers.updatePostHandler, handler_doDeleteWorkOrderComment);
|
||||
router.post("/doAddWorkOrderMilestone", permissionHandlers.updatePostHandler, handler_doAddWorkOrderMilestone);
|
||||
router.post("/doUpdateWorkOrderMilestone", permissionHandlers.updatePostHandler, handler_doUpdateWorkOrderMilestone);
|
||||
router.post("/doCompleteWorkOrderMilestone", permissionHandlers.updatePostHandler, handler_doCompleteWorkOrderMilestone);
|
||||
router.post("/doReopenWorkOrderMilestone", permissionHandlers.updatePostHandler, handler_doReopenWorkOrderMilestone);
|
||||
router.post("/doDeleteWorkOrderMilestone", permissionHandlers.updatePostHandler, handler_doDeleteWorkOrderMilestone);
|
||||
router.get('/', handler_search);
|
||||
router.post('/doSearchWorkOrders', handler_doSearchWorkOrders);
|
||||
router.get('/milestoneCalendar', handler_milestoneCalendar);
|
||||
router.post('/doGetWorkOrderMilestones', handler_doGetWorkOrderMilestones);
|
||||
router.get('/outlook', handler_outlook);
|
||||
router.get('/new', permissionHandlers.adminGetHandler, handler_new);
|
||||
router.post('/doCreateWorkOrder', permissionHandlers.updatePostHandler, handler_doCreateWorkOrder);
|
||||
router.get('/:workOrderId', handler_view);
|
||||
router.post('/doReopenWorkOrder', permissionHandlers.updatePostHandler, handler_doReopenWorkOrder);
|
||||
router.get('/:workOrderId/edit', permissionHandlers.updateGetHandler, handler_edit);
|
||||
router.post('/doUpdateWorkOrder', permissionHandlers.updatePostHandler, handler_doUpdateWorkOrder);
|
||||
router.post('/doCloseWorkOrder', permissionHandlers.updatePostHandler, handler_doCloseWorkOrder);
|
||||
router.post('/doDeleteWorkOrder', permissionHandlers.updatePostHandler, handler_doDeleteWorkOrder);
|
||||
router.post('/doAddWorkOrderLotOccupancy', permissionHandlers.updatePostHandler, handler_doAddWorkOrderLotOccupancy);
|
||||
router.post('/doDeleteWorkOrderLotOccupancy', permissionHandlers.updatePostHandler, handler_doDeleteWorkOrderLotOccupancy);
|
||||
router.post('/doAddWorkOrderLot', permissionHandlers.updatePostHandler, handler_doAddWorkOrderLot);
|
||||
router.post('/doUpdateLotStatus', permissionHandlers.updatePostHandler, handler_doUpdateLotStatus);
|
||||
router.post('/doDeleteWorkOrderLot', permissionHandlers.updatePostHandler, handler_doDeleteWorkOrderLot);
|
||||
router.post('/doAddWorkOrderComment', permissionHandlers.updatePostHandler, handler_doAddWorkOrderComment);
|
||||
router.post('/doUpdateWorkOrderComment', permissionHandlers.updatePostHandler, handler_doUpdateWorkOrderComment);
|
||||
router.post('/doDeleteWorkOrderComment', permissionHandlers.updatePostHandler, handler_doDeleteWorkOrderComment);
|
||||
router.post('/doAddWorkOrderMilestone', permissionHandlers.updatePostHandler, handler_doAddWorkOrderMilestone);
|
||||
router.post('/doUpdateWorkOrderMilestone', permissionHandlers.updatePostHandler, handler_doUpdateWorkOrderMilestone);
|
||||
router.post('/doCompleteWorkOrderMilestone', permissionHandlers.updatePostHandler, handler_doCompleteWorkOrderMilestone);
|
||||
router.post('/doReopenWorkOrderMilestone', permissionHandlers.updatePostHandler, handler_doReopenWorkOrderMilestone);
|
||||
router.post('/doDeleteWorkOrderMilestone', permissionHandlers.updatePostHandler, handler_doDeleteWorkOrderMilestone);
|
||||
export default router;
|
||||
|
|
|
|||
|
|
@ -1,189 +1,189 @@
|
|||
import { Router } from "express";
|
||||
import { Router } from 'express'
|
||||
|
||||
import * as permissionHandlers from "../handlers/permissions.js";
|
||||
import * as permissionHandlers from '../handlers/permissions.js'
|
||||
|
||||
import handler_search from "../handlers/workOrders-get/search.js";
|
||||
import handler_doSearchWorkOrders from "../handlers/workOrders-post/doSearchWorkOrders.js";
|
||||
import handler_search from '../handlers/workOrders-get/search.js'
|
||||
import handler_doSearchWorkOrders from '../handlers/workOrders-post/doSearchWorkOrders.js'
|
||||
|
||||
import handler_milestoneCalendar from "../handlers/workOrders-get/milestoneCalendar.js";
|
||||
import handler_doGetWorkOrderMilestones from "../handlers/workOrders-post/doGetWorkOrderMilestones.js";
|
||||
import handler_milestoneCalendar from '../handlers/workOrders-get/milestoneCalendar.js'
|
||||
import handler_doGetWorkOrderMilestones from '../handlers/workOrders-post/doGetWorkOrderMilestones.js'
|
||||
|
||||
import handler_outlook from "../handlers/workOrders-get/outlook.js";
|
||||
import handler_outlook from '../handlers/workOrders-get/outlook.js'
|
||||
|
||||
import handler_view from "../handlers/workOrders-get/view.js";
|
||||
import handler_doReopenWorkOrder from "../handlers/workOrders-post/doReopenWorkOrder.js";
|
||||
import handler_view from '../handlers/workOrders-get/view.js'
|
||||
import handler_doReopenWorkOrder from '../handlers/workOrders-post/doReopenWorkOrder.js'
|
||||
|
||||
import handler_new from "../handlers/workOrders-get/new.js";
|
||||
import handler_doCreateWorkOrder from "../handlers/workOrders-post/doCreateWorkOrder.js";
|
||||
import handler_new from '../handlers/workOrders-get/new.js'
|
||||
import handler_doCreateWorkOrder from '../handlers/workOrders-post/doCreateWorkOrder.js'
|
||||
|
||||
import handler_edit from "../handlers/workOrders-get/edit.js";
|
||||
import handler_doUpdateWorkOrder from "../handlers/workOrders-post/doUpdateWorkOrder.js";
|
||||
import handler_doCloseWorkOrder from "../handlers/workOrders-post/doCloseWorkOrder.js";
|
||||
import handler_doDeleteWorkOrder from "../handlers/workOrders-post/doDeleteWorkOrder.js";
|
||||
import handler_edit from '../handlers/workOrders-get/edit.js'
|
||||
import handler_doUpdateWorkOrder from '../handlers/workOrders-post/doUpdateWorkOrder.js'
|
||||
import handler_doCloseWorkOrder from '../handlers/workOrders-post/doCloseWorkOrder.js'
|
||||
import handler_doDeleteWorkOrder from '../handlers/workOrders-post/doDeleteWorkOrder.js'
|
||||
|
||||
import handler_doAddWorkOrderLotOccupancy from "../handlers/workOrders-post/doAddWorkOrderLotOccupancy.js";
|
||||
import handler_doDeleteWorkOrderLotOccupancy from "../handlers/workOrders-post/doDeleteWorkOrderLotOccupancy.js";
|
||||
import handler_doAddWorkOrderLotOccupancy from '../handlers/workOrders-post/doAddWorkOrderLotOccupancy.js'
|
||||
import handler_doDeleteWorkOrderLotOccupancy from '../handlers/workOrders-post/doDeleteWorkOrderLotOccupancy.js'
|
||||
|
||||
import handler_doAddWorkOrderLot from "../handlers/workOrders-post/doAddWorkOrderLot.js";
|
||||
import handler_doUpdateLotStatus from "../handlers/workOrders-post/doUpdateLotStatus.js";
|
||||
import handler_doDeleteWorkOrderLot from "../handlers/workOrders-post/doDeleteWorkOrderLot.js";
|
||||
import handler_doAddWorkOrderLot from '../handlers/workOrders-post/doAddWorkOrderLot.js'
|
||||
import handler_doUpdateLotStatus from '../handlers/workOrders-post/doUpdateLotStatus.js'
|
||||
import handler_doDeleteWorkOrderLot from '../handlers/workOrders-post/doDeleteWorkOrderLot.js'
|
||||
|
||||
import handler_doAddWorkOrderComment from "../handlers/workOrders-post/doAddWorkOrderComment.js";
|
||||
import handler_doUpdateWorkOrderComment from "../handlers/workOrders-post/doUpdateWorkOrderComment.js";
|
||||
import handler_doDeleteWorkOrderComment from "../handlers/workOrders-post/doDeleteWorkOrderComment.js";
|
||||
import handler_doAddWorkOrderComment from '../handlers/workOrders-post/doAddWorkOrderComment.js'
|
||||
import handler_doUpdateWorkOrderComment from '../handlers/workOrders-post/doUpdateWorkOrderComment.js'
|
||||
import handler_doDeleteWorkOrderComment from '../handlers/workOrders-post/doDeleteWorkOrderComment.js'
|
||||
|
||||
import handler_doAddWorkOrderMilestone from "../handlers/workOrders-post/doAddWorkOrderMilestone.js";
|
||||
import handler_doUpdateWorkOrderMilestone from "../handlers/workOrders-post/doUpdateWorkOrderMilestone.js";
|
||||
import handler_doCompleteWorkOrderMilestone from "../handlers/workOrders-post/doCompleteWorkOrderMilestone.js";
|
||||
import handler_doReopenWorkOrderMilestone from "../handlers/workOrders-post/doReopenWorkOrderMilestone.js";
|
||||
import handler_doDeleteWorkOrderMilestone from "../handlers/workOrders-post/doDeleteWorkOrderMilestone.js";
|
||||
import handler_doAddWorkOrderMilestone from '../handlers/workOrders-post/doAddWorkOrderMilestone.js'
|
||||
import handler_doUpdateWorkOrderMilestone from '../handlers/workOrders-post/doUpdateWorkOrderMilestone.js'
|
||||
import handler_doCompleteWorkOrderMilestone from '../handlers/workOrders-post/doCompleteWorkOrderMilestone.js'
|
||||
import handler_doReopenWorkOrderMilestone from '../handlers/workOrders-post/doReopenWorkOrderMilestone.js'
|
||||
import handler_doDeleteWorkOrderMilestone from '../handlers/workOrders-post/doDeleteWorkOrderMilestone.js'
|
||||
|
||||
export const router = Router();
|
||||
export const router = Router()
|
||||
|
||||
// Search
|
||||
|
||||
router.get("/", handler_search);
|
||||
router.get('/', handler_search)
|
||||
|
||||
router.post("/doSearchWorkOrders", handler_doSearchWorkOrders);
|
||||
router.post('/doSearchWorkOrders', handler_doSearchWorkOrders)
|
||||
|
||||
// Milestone Calendar
|
||||
|
||||
router.get("/milestoneCalendar", handler_milestoneCalendar);
|
||||
router.get('/milestoneCalendar', handler_milestoneCalendar)
|
||||
|
||||
router.post("/doGetWorkOrderMilestones", handler_doGetWorkOrderMilestones);
|
||||
router.post('/doGetWorkOrderMilestones', handler_doGetWorkOrderMilestones)
|
||||
|
||||
// Outlook Integration
|
||||
|
||||
router.get("/outlook", handler_outlook);
|
||||
router.get('/outlook', handler_outlook)
|
||||
|
||||
// New
|
||||
|
||||
router.get("/new", permissionHandlers.adminGetHandler, handler_new);
|
||||
router.get('/new', permissionHandlers.adminGetHandler, handler_new)
|
||||
|
||||
router.post(
|
||||
"/doCreateWorkOrder",
|
||||
'/doCreateWorkOrder',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doCreateWorkOrder
|
||||
);
|
||||
)
|
||||
|
||||
// View
|
||||
|
||||
router.get("/:workOrderId", handler_view);
|
||||
router.get('/:workOrderId', handler_view)
|
||||
|
||||
router.post(
|
||||
"/doReopenWorkOrder",
|
||||
'/doReopenWorkOrder',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doReopenWorkOrder
|
||||
);
|
||||
)
|
||||
|
||||
// Edit
|
||||
|
||||
router.get(
|
||||
"/:workOrderId/edit",
|
||||
'/:workOrderId/edit',
|
||||
permissionHandlers.updateGetHandler,
|
||||
handler_edit
|
||||
);
|
||||
)
|
||||
|
||||
router.post(
|
||||
"/doUpdateWorkOrder",
|
||||
'/doUpdateWorkOrder',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doUpdateWorkOrder
|
||||
);
|
||||
)
|
||||
|
||||
router.post(
|
||||
"/doCloseWorkOrder",
|
||||
'/doCloseWorkOrder',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doCloseWorkOrder
|
||||
);
|
||||
)
|
||||
|
||||
router.post(
|
||||
"/doDeleteWorkOrder",
|
||||
'/doDeleteWorkOrder',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doDeleteWorkOrder
|
||||
);
|
||||
)
|
||||
|
||||
// Lot Occupancy
|
||||
|
||||
router.post(
|
||||
"/doAddWorkOrderLotOccupancy",
|
||||
'/doAddWorkOrderLotOccupancy',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doAddWorkOrderLotOccupancy
|
||||
);
|
||||
)
|
||||
|
||||
router.post(
|
||||
"/doDeleteWorkOrderLotOccupancy",
|
||||
'/doDeleteWorkOrderLotOccupancy',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doDeleteWorkOrderLotOccupancy
|
||||
);
|
||||
)
|
||||
|
||||
router.post(
|
||||
"/doAddWorkOrderLot",
|
||||
'/doAddWorkOrderLot',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doAddWorkOrderLot
|
||||
);
|
||||
)
|
||||
|
||||
router.post(
|
||||
"/doUpdateLotStatus",
|
||||
'/doUpdateLotStatus',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doUpdateLotStatus
|
||||
);
|
||||
)
|
||||
|
||||
router.post(
|
||||
"/doDeleteWorkOrderLot",
|
||||
'/doDeleteWorkOrderLot',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doDeleteWorkOrderLot
|
||||
);
|
||||
)
|
||||
|
||||
// Comments
|
||||
|
||||
router.post(
|
||||
"/doAddWorkOrderComment",
|
||||
'/doAddWorkOrderComment',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doAddWorkOrderComment
|
||||
);
|
||||
)
|
||||
|
||||
router.post(
|
||||
"/doUpdateWorkOrderComment",
|
||||
'/doUpdateWorkOrderComment',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doUpdateWorkOrderComment
|
||||
);
|
||||
)
|
||||
|
||||
router.post(
|
||||
"/doDeleteWorkOrderComment",
|
||||
'/doDeleteWorkOrderComment',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doDeleteWorkOrderComment
|
||||
);
|
||||
)
|
||||
|
||||
// Milestones
|
||||
|
||||
router.post(
|
||||
"/doAddWorkOrderMilestone",
|
||||
'/doAddWorkOrderMilestone',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doAddWorkOrderMilestone
|
||||
);
|
||||
)
|
||||
|
||||
router.post(
|
||||
"/doUpdateWorkOrderMilestone",
|
||||
'/doUpdateWorkOrderMilestone',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doUpdateWorkOrderMilestone
|
||||
);
|
||||
)
|
||||
|
||||
router.post(
|
||||
"/doCompleteWorkOrderMilestone",
|
||||
'/doCompleteWorkOrderMilestone',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doCompleteWorkOrderMilestone
|
||||
);
|
||||
)
|
||||
|
||||
router.post(
|
||||
"/doReopenWorkOrderMilestone",
|
||||
'/doReopenWorkOrderMilestone',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doReopenWorkOrderMilestone
|
||||
);
|
||||
)
|
||||
|
||||
router.post(
|
||||
"/doDeleteWorkOrderMilestone",
|
||||
'/doDeleteWorkOrderMilestone',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doDeleteWorkOrderMilestone
|
||||
);
|
||||
)
|
||||
|
||||
export default router;
|
||||
export default router
|
||||
|
|
|
|||
|
|
@ -1,25 +1,18 @@
|
|||
import fs from "node:fs";
|
||||
import * as sql from "@cityssm/mssql-multi-pool";
|
||||
import { soMSSQL } from "./config.js";
|
||||
import fs from 'node:fs';
|
||||
import * as sql from '@cityssm/mssql-multi-pool';
|
||||
import { soMSSQL } from './config.js';
|
||||
async function importMaps() {
|
||||
let pool;
|
||||
try {
|
||||
pool = await sql.connect(soMSSQL);
|
||||
const result = await pool.query("select m.ID as mapId, m.Name as mapName," +
|
||||
" l.ID as layerId, l.Name as layerName, l.Image as layerImage" +
|
||||
" from Legacy_Maps m" +
|
||||
" left join Legacy_Layers l on m.ID = l.Map_ID");
|
||||
const result = await pool.query('select m.ID as mapId, m.Name as mapName,' +
|
||||
' l.ID as layerId, l.Name as layerName, l.Image as layerImage' +
|
||||
' from Legacy_Maps m' +
|
||||
' left join Legacy_Layers l on m.ID = l.Map_ID');
|
||||
for (const layer of result.recordset) {
|
||||
const imageBuffer = layer.layerImage;
|
||||
const fileName = layer.mapName +
|
||||
" - " +
|
||||
layer.layerName +
|
||||
" (" +
|
||||
layer.mapId +
|
||||
", " +
|
||||
layer.layerId +
|
||||
").wmf";
|
||||
fs.writeFile("./temp/wmf/" + fileName, imageBuffer, (error) => {
|
||||
const fileName = `${layer.mapName} - ${layer.layerName} (${layer.mapId}, ${layer.layerId}).wmf`;
|
||||
fs.writeFile('./temp/wmf/' + fileName, imageBuffer, (error) => {
|
||||
if (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,51 +1,43 @@
|
|||
/* eslint-disable node/no-extraneous-import, node/no-unpublished-import */
|
||||
|
||||
import fs from "node:fs";
|
||||
import * as sql from "@cityssm/mssql-multi-pool";
|
||||
import { soMSSQL } from "./config.js";
|
||||
import type * as sqlTypes from "mssql";
|
||||
import fs from 'node:fs'
|
||||
import * as sql from '@cityssm/mssql-multi-pool'
|
||||
import { soMSSQL } from './config.js'
|
||||
import type * as sqlTypes from 'mssql'
|
||||
|
||||
async function importMaps() {
|
||||
let pool: sqlTypes.ConnectionPool;
|
||||
async function importMaps(): Promise<void> {
|
||||
let pool: sqlTypes.ConnectionPool
|
||||
|
||||
try {
|
||||
pool = await sql.connect(soMSSQL);
|
||||
pool = await sql.connect(soMSSQL)
|
||||
|
||||
const result = await pool.query(
|
||||
"select m.ID as mapId, m.Name as mapName," +
|
||||
" l.ID as layerId, l.Name as layerName, l.Image as layerImage" +
|
||||
" from Legacy_Maps m" +
|
||||
" left join Legacy_Layers l on m.ID = l.Map_ID"
|
||||
);
|
||||
'select m.ID as mapId, m.Name as mapName,' +
|
||||
' l.ID as layerId, l.Name as layerName, l.Image as layerImage' +
|
||||
' from Legacy_Maps m' +
|
||||
' left join Legacy_Layers l on m.ID = l.Map_ID'
|
||||
)
|
||||
|
||||
for (const layer of result.recordset) {
|
||||
const imageBuffer: Buffer = layer.layerImage;
|
||||
const imageBuffer: Buffer = layer.layerImage
|
||||
|
||||
const fileName =
|
||||
layer.mapName +
|
||||
" - " +
|
||||
layer.layerName +
|
||||
" (" +
|
||||
layer.mapId +
|
||||
", " +
|
||||
layer.layerId +
|
||||
").wmf";
|
||||
const fileName = `${layer.mapName} - ${layer.layerName} (${layer.mapId}, ${layer.layerId}).wmf`
|
||||
|
||||
fs.writeFile("./temp/wmf/" + fileName, imageBuffer, (error) => {
|
||||
fs.writeFile('./temp/wmf/' + fileName, imageBuffer, (error) => {
|
||||
if (error) {
|
||||
console.log(error);
|
||||
console.log(error)
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
} catch {
|
||||
// ignore
|
||||
} finally {
|
||||
try {
|
||||
pool.close();
|
||||
pool.close()
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
await importMaps();
|
||||
await importMaps()
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import * as assert from "assert";
|
||||
import fs from "node:fs";
|
||||
import { version } from "../version.js";
|
||||
describe("version", () => {
|
||||
it("has a version that matches the package.json", () => {
|
||||
const packageJSON = JSON.parse(fs.readFileSync("package.json", "utf8"));
|
||||
import * as assert from 'node:assert';
|
||||
import fs from 'node:fs';
|
||||
import { version } from '../version.js';
|
||||
describe('version', () => {
|
||||
it('has a version that matches the package.json', () => {
|
||||
const packageJSON = JSON.parse(fs.readFileSync('package.json', 'utf8'));
|
||||
assert.strictEqual(version, packageJSON.version);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import * as assert from "assert";
|
||||
import * as assert from 'node:assert'
|
||||
|
||||
import fs from "node:fs";
|
||||
import fs from 'node:fs'
|
||||
|
||||
import { version } from "../version.js";
|
||||
import { version } from '../version.js'
|
||||
|
||||
describe("version", () => {
|
||||
it("has a version that matches the package.json", () => {
|
||||
const packageJSON = JSON.parse(fs.readFileSync("package.json", "utf8"));
|
||||
assert.strictEqual(version, packageJSON.version);
|
||||
});
|
||||
});
|
||||
describe('version', () => {
|
||||
it('has a version that matches the package.json', () => {
|
||||
const packageJSON = JSON.parse(fs.readFileSync('package.json', 'utf8'))
|
||||
assert.strictEqual(version, packageJSON.version)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ export interface Config {
|
|||
recordDeleteAgeDays?: number;
|
||||
};
|
||||
printPdf: {
|
||||
contentDisposition?: "attachment" | "inline";
|
||||
contentDisposition?: 'attachment' | 'inline';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,93 +1,93 @@
|
|||
export interface Config {
|
||||
application: ConfigApplication;
|
||||
session: ConfigSession;
|
||||
application: ConfigApplication
|
||||
session: ConfigSession
|
||||
reverseProxy: {
|
||||
disableCompression?: boolean;
|
||||
disableEtag?: boolean;
|
||||
urlPrefix?: string;
|
||||
};
|
||||
activeDirectory?: ConfigActiveDirectory;
|
||||
disableCompression?: boolean
|
||||
disableEtag?: boolean
|
||||
urlPrefix?: string
|
||||
}
|
||||
activeDirectory?: ConfigActiveDirectory
|
||||
users: {
|
||||
testing?: string[];
|
||||
canLogin?: string[];
|
||||
canUpdate?: string[];
|
||||
isAdmin?: string[];
|
||||
};
|
||||
testing?: string[]
|
||||
canLogin?: string[]
|
||||
canUpdate?: string[]
|
||||
isAdmin?: string[]
|
||||
}
|
||||
aliases: {
|
||||
lot?: string;
|
||||
lots?: string;
|
||||
map?: string;
|
||||
maps?: string;
|
||||
occupancy?: string;
|
||||
occupancies?: string;
|
||||
occupancyStartDate?: string;
|
||||
occupant?: string;
|
||||
occupants?: string;
|
||||
externalReceiptNumber?: string;
|
||||
workOrderOpenDate?: string;
|
||||
workOrderCloseDate?: string;
|
||||
};
|
||||
lot?: string
|
||||
lots?: string
|
||||
map?: string
|
||||
maps?: string
|
||||
occupancy?: string
|
||||
occupancies?: string
|
||||
occupancyStartDate?: string
|
||||
occupant?: string
|
||||
occupants?: string
|
||||
externalReceiptNumber?: string
|
||||
workOrderOpenDate?: string
|
||||
workOrderCloseDate?: string
|
||||
}
|
||||
settings: {
|
||||
fees: {
|
||||
taxPercentageDefault?: number;
|
||||
};
|
||||
map: {
|
||||
mapCityDefault?: string;
|
||||
mapProvinceDefault?: string;
|
||||
};
|
||||
lot: {
|
||||
lotNamePattern?: RegExp;
|
||||
lotNameHelpText?: string;
|
||||
lotNameSortNameFunction?: (lotName: string) => string;
|
||||
};
|
||||
lotOccupancy: {
|
||||
lotIdIsRequired?: boolean;
|
||||
occupancyEndDateIsRequired?: boolean;
|
||||
occupantCityDefault?: string;
|
||||
occupantProvinceDefault?: string;
|
||||
prints?: string[];
|
||||
};
|
||||
workOrders: {
|
||||
workOrderNumberLength?: number;
|
||||
workOrderMilestoneDateRecentBeforeDays?: number;
|
||||
workOrderMilestoneDateRecentAfterDays?: number;
|
||||
calendarEmailAddress?: string;
|
||||
prints?: string[];
|
||||
};
|
||||
adminCleanup: {
|
||||
recordDeleteAgeDays?: number;
|
||||
};
|
||||
printPdf: {
|
||||
contentDisposition?: "attachment" | "inline";
|
||||
taxPercentageDefault?: number
|
||||
}
|
||||
map: {
|
||||
mapCityDefault?: string
|
||||
mapProvinceDefault?: string
|
||||
}
|
||||
lot: {
|
||||
lotNamePattern?: RegExp
|
||||
lotNameHelpText?: string
|
||||
lotNameSortNameFunction?: (lotName: string) => string
|
||||
}
|
||||
lotOccupancy: {
|
||||
lotIdIsRequired?: boolean
|
||||
occupancyEndDateIsRequired?: boolean
|
||||
occupantCityDefault?: string
|
||||
occupantProvinceDefault?: string
|
||||
prints?: string[]
|
||||
}
|
||||
workOrders: {
|
||||
workOrderNumberLength?: number
|
||||
workOrderMilestoneDateRecentBeforeDays?: number
|
||||
workOrderMilestoneDateRecentAfterDays?: number
|
||||
calendarEmailAddress?: string
|
||||
prints?: string[]
|
||||
}
|
||||
adminCleanup: {
|
||||
recordDeleteAgeDays?: number
|
||||
}
|
||||
printPdf: {
|
||||
contentDisposition?: 'attachment' | 'inline'
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
interface ConfigApplication {
|
||||
applicationName?: string;
|
||||
backgroundURL?: string;
|
||||
logoURL?: string;
|
||||
httpPort?: number;
|
||||
userDomain?: string;
|
||||
useTestDatabases?: boolean;
|
||||
ntfyStartup?: ConfigNtfyStartup;
|
||||
applicationName?: string
|
||||
backgroundURL?: string
|
||||
logoURL?: string
|
||||
httpPort?: number
|
||||
userDomain?: string
|
||||
useTestDatabases?: boolean
|
||||
ntfyStartup?: ConfigNtfyStartup
|
||||
}
|
||||
|
||||
export interface ConfigNtfyStartup {
|
||||
topic: string;
|
||||
server?: string;
|
||||
topic: string
|
||||
server?: string
|
||||
}
|
||||
|
||||
interface ConfigSession {
|
||||
cookieName?: string;
|
||||
secret?: string;
|
||||
maxAgeMillis?: number;
|
||||
doKeepAlive?: boolean;
|
||||
cookieName?: string
|
||||
secret?: string
|
||||
maxAgeMillis?: number
|
||||
doKeepAlive?: boolean
|
||||
}
|
||||
|
||||
export interface ConfigActiveDirectory {
|
||||
url: string;
|
||||
baseDN: string;
|
||||
username: string;
|
||||
password: string;
|
||||
url: string
|
||||
baseDN: string
|
||||
username: string
|
||||
password: string
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
export interface LOS {
|
||||
urlPrefix: string;
|
||||
apiKey: string;
|
||||
highlightMap: (mapContainerElement: HTMLElement, mapKey: string, contextualClass: "success" | "danger") => void;
|
||||
highlightMap: (mapContainerElement: HTMLElement, mapKey: string, contextualClass: 'success' | 'danger') => void;
|
||||
initializeDatePickers: (containerElement: HTMLElement) => void;
|
||||
initializeUnlockFieldButtons: (containerElement: HTMLElement) => void;
|
||||
populateAliases: (containerElement: HTMLElement) => void;
|
||||
|
|
|
|||
|
|
@ -1,63 +1,75 @@
|
|||
export interface LOS {
|
||||
urlPrefix: string;
|
||||
apiKey: string;
|
||||
urlPrefix: string
|
||||
apiKey: string
|
||||
|
||||
highlightMap: (
|
||||
mapContainerElement: HTMLElement,
|
||||
mapKey: string,
|
||||
contextualClass: "success" | "danger"
|
||||
) => void;
|
||||
contextualClass: 'success' | 'danger'
|
||||
) => void
|
||||
|
||||
initializeDatePickers: (containerElement: HTMLElement) => void;
|
||||
initializeDatePickers: (containerElement: HTMLElement) => void
|
||||
// initializeTimePickers: (containerElement: HTMLElement) => void;
|
||||
|
||||
initializeUnlockFieldButtons: (containerElement: HTMLElement) => void;
|
||||
initializeUnlockFieldButtons: (containerElement: HTMLElement) => void
|
||||
|
||||
populateAliases: (containerElement: HTMLElement) => void;
|
||||
populateAliases: (containerElement: HTMLElement) => void
|
||||
|
||||
escapedAliases: {
|
||||
Map: string;
|
||||
map: string;
|
||||
Maps: string;
|
||||
maps: string;
|
||||
Lot: string;
|
||||
lot: string;
|
||||
Lots: string;
|
||||
lots: string;
|
||||
Occupancy: string;
|
||||
occupancy: string;
|
||||
Occupancies: string;
|
||||
occupancies: string;
|
||||
Occupant: string;
|
||||
occupant: string;
|
||||
Occupants: string;
|
||||
occupants: string;
|
||||
ExternalReceiptNumber: string;
|
||||
externalReceiptNumber: string;
|
||||
OccupancyStartDate: string;
|
||||
occupancyStartDate: string;
|
||||
WorkOrderOpenDate: string;
|
||||
workOrderOpenDate: string;
|
||||
WorkOrderCloseDate: string;
|
||||
workOrderCloseDate: string;
|
||||
};
|
||||
Map: string
|
||||
map: string
|
||||
Maps: string
|
||||
maps: string
|
||||
Lot: string
|
||||
lot: string
|
||||
Lots: string
|
||||
lots: string
|
||||
Occupancy: string
|
||||
occupancy: string
|
||||
Occupancies: string
|
||||
occupancies: string
|
||||
Occupant: string
|
||||
occupant: string
|
||||
Occupants: string
|
||||
occupants: string
|
||||
ExternalReceiptNumber: string
|
||||
externalReceiptNumber: string
|
||||
OccupancyStartDate: string
|
||||
occupancyStartDate: string
|
||||
WorkOrderOpenDate: string
|
||||
workOrderOpenDate: string
|
||||
WorkOrderCloseDate: string
|
||||
workOrderCloseDate: string
|
||||
}
|
||||
|
||||
getRandomColor: (seedString: string) => string;
|
||||
getRandomColor: (seedString: string) => string
|
||||
|
||||
setUnsavedChanges: () => void;
|
||||
clearUnsavedChanges: () => void;
|
||||
hasUnsavedChanges: () => boolean;
|
||||
setUnsavedChanges: () => void
|
||||
clearUnsavedChanges: () => void
|
||||
hasUnsavedChanges: () => boolean
|
||||
|
||||
getMoveUpDownButtonFieldHTML: (
|
||||
upButtonClassNames: string,
|
||||
downButtonClassNames: string,
|
||||
isSmall?: boolean
|
||||
) => string;
|
||||
getLoadingParagraphHTML: (captionText?: string) => string;
|
||||
getSearchResultsPagerHTML: (limit: number, offset: number, count: number) => string;
|
||||
) => string
|
||||
getLoadingParagraphHTML: (captionText?: string) => string
|
||||
getSearchResultsPagerHTML: (
|
||||
limit: number,
|
||||
offset: number,
|
||||
count: number
|
||||
) => string
|
||||
|
||||
getMapURL: (mapId?: number | string, edit?: boolean, time?: boolean) => string;
|
||||
getLotURL: (lotId?: number | string, edit?: boolean, time?: boolean) => string;
|
||||
getLotOccupancyURL: (lotOccupancyId?: number | string, edit?: boolean, time?: boolean) => string;
|
||||
getWorkOrderURL: (workOrderId?: number | string, edit?: boolean, time?: boolean) => string;
|
||||
getMapURL: (mapId?: number | string, edit?: boolean, time?: boolean) => string
|
||||
getLotURL: (lotId?: number | string, edit?: boolean, time?: boolean) => string
|
||||
getLotOccupancyURL: (
|
||||
lotOccupancyId?: number | string,
|
||||
edit?: boolean,
|
||||
time?: boolean
|
||||
) => string
|
||||
getWorkOrderURL: (
|
||||
workOrderId?: number | string,
|
||||
edit?: boolean,
|
||||
time?: boolean
|
||||
) => string
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Service } from "node-windows";
|
||||
import { serviceConfig } from "./windowsService.js";
|
||||
import { Service } from 'node-windows';
|
||||
import { serviceConfig } from './windowsService.js';
|
||||
const svc = new Service(serviceConfig);
|
||||
svc.on("install", () => {
|
||||
svc.on('install', () => {
|
||||
svc.start();
|
||||
});
|
||||
svc.install();
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
import { Service } from "node-windows";
|
||||
import { serviceConfig } from "./windowsService.js";
|
||||
import { Service } from 'node-windows'
|
||||
import { serviceConfig } from './windowsService.js'
|
||||
|
||||
// Create a new service object
|
||||
const svc = new Service(serviceConfig);
|
||||
const svc = new Service(serviceConfig)
|
||||
|
||||
// Listen for the "install" event, which indicates the
|
||||
// process is available as a service.
|
||||
svc.on("install", () => {
|
||||
svc.start();
|
||||
});
|
||||
svc.on('install', () => {
|
||||
svc.start()
|
||||
})
|
||||
|
||||
svc.install();
|
||||
svc.install()
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { Service } from "node-windows";
|
||||
import { serviceConfig } from "./windowsService.js";
|
||||
import { Service } from 'node-windows';
|
||||
import { serviceConfig } from './windowsService.js';
|
||||
const svc = new Service(serviceConfig);
|
||||
svc.on("uninstall", function () {
|
||||
console.log("Uninstall complete.");
|
||||
console.log("The service exists:", svc.exists);
|
||||
svc.on('uninstall', function () {
|
||||
console.log('Uninstall complete.');
|
||||
console.log('The service exists:', svc.exists);
|
||||
});
|
||||
svc.uninstall();
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
import { Service } from "node-windows";
|
||||
import { serviceConfig } from "./windowsService.js";
|
||||
import { Service } from 'node-windows'
|
||||
import { serviceConfig } from './windowsService.js'
|
||||
|
||||
// Create a new service object
|
||||
const svc = new Service(serviceConfig);
|
||||
const svc = new Service(serviceConfig)
|
||||
|
||||
// Listen for the "uninstall" event so we know when it's done.
|
||||
svc.on("uninstall", function () {
|
||||
console.log("Uninstall complete.");
|
||||
console.log("The service exists:", svc.exists);
|
||||
});
|
||||
svc.on('uninstall', function () {
|
||||
console.log('Uninstall complete.')
|
||||
console.log('The service exists:', svc.exists)
|
||||
})
|
||||
|
||||
// Uninstall the service.
|
||||
svc.uninstall();
|
||||
svc.uninstall()
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
import type { ServiceConfig } from "node-windows";
|
||||
import type { ServiceConfig } from 'node-windows';
|
||||
export declare const serviceConfig: ServiceConfig;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import path from "path";
|
||||
const __dirname = ".";
|
||||
import path from 'node:path';
|
||||
const _dirname = '.';
|
||||
export const serviceConfig = {
|
||||
name: "Lot Occupancy Manager",
|
||||
description: "A system for managing the occupancy of lots. (i.e. Cemetery management)",
|
||||
script: path.join(__dirname, "bin", "www.js")
|
||||
name: 'Lot Occupancy Manager',
|
||||
description: 'A system for managing the occupancy of lots. (i.e. Cemetery management)',
|
||||
script: path.join(_dirname, 'bin', 'www.js')
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import path from "path";
|
||||
import type { ServiceConfig } from "node-windows";
|
||||
import path from 'node:path'
|
||||
import type { ServiceConfig } from 'node-windows'
|
||||
|
||||
const __dirname = ".";
|
||||
const _dirname = '.'
|
||||
|
||||
export const serviceConfig: ServiceConfig = {
|
||||
name: "Lot Occupancy Manager",
|
||||
name: 'Lot Occupancy Manager',
|
||||
description:
|
||||
"A system for managing the occupancy of lots. (i.e. Cemetery management)",
|
||||
script: path.join(__dirname, "bin", "www.js")
|
||||
};
|
||||
'A system for managing the occupancy of lots. (i.e. Cemetery management)',
|
||||
script: path.join(_dirname, 'bin', 'www.js')
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue