Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
dangowans committed Jun 27, 2024
1 parent 7620c34 commit 604e122
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 37 deletions.
8 changes: 3 additions & 5 deletions public-typescript/adminOccupancyTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
function moveOccupancyType(clickEvent) {
const buttonElement = clickEvent.currentTarget;
const occupancyTypeId = clickEvent.currentTarget.closest('.container--occupancyType').dataset.occupancyTypeId;
cityssm.postJSON(los.urlPrefix +
'/admin/' +
(buttonElement.dataset.direction === 'up'
? 'doMoveOccupancyTypeUp'
: 'doMoveOccupancyTypeDown'), {
cityssm.postJSON(`${los.urlPrefix}/admin/${buttonElement.dataset.direction === 'up'
? 'doMoveOccupancyTypeUp'
: 'doMoveOccupancyTypeDown'}`, {
occupancyTypeId,
moveToEnd: clickEvent.shiftKey ? '1' : '0'
}, occupancyTypeResponseHandler);
Expand Down
8 changes: 4 additions & 4 deletions public-typescript/adminOccupancyTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,11 @@ type ResponseJSON =
).dataset.occupancyTypeId

cityssm.postJSON(
los.urlPrefix +
'/admin/' +
(buttonElement.dataset.direction === 'up'
`${los.urlPrefix}/admin/${
buttonElement.dataset.direction === 'up'
? 'doMoveOccupancyTypeUp'
: 'doMoveOccupancyTypeDown'),
: 'doMoveOccupancyTypeDown'
}`,
{
occupancyTypeId,
moveToEnd: clickEvent.shiftKey ? '1' : '0'
Expand Down
2 changes: 1 addition & 1 deletion public-typescript/lotEdit.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
lotFieldsContainerElement.innerHTML = '';
let lotTypeFieldIds = '';
for (const lotTypeField of responseJSON.lotTypeFields) {
lotTypeFieldIds += ',' + lotTypeField.lotTypeFieldId.toString();
lotTypeFieldIds += `,${lotTypeField.lotTypeFieldId.toString()}`;
const fieldName = `lotFieldValue_${lotTypeField.lotTypeFieldId.toString()}`;
const fieldId = `lot--${fieldName}`;
const fieldElement = document.createElement('div');
Expand Down
2 changes: 1 addition & 1 deletion public-typescript/lotEdit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ declare const exports: Record<string, unknown>
let lotTypeFieldIds = ''

for (const lotTypeField of responseJSON.lotTypeFields) {
lotTypeFieldIds += ',' + lotTypeField.lotTypeFieldId.toString()
lotTypeFieldIds += `,${lotTypeField.lotTypeFieldId.toString()}`

const fieldName = `lotFieldValue_${lotTypeField.lotTypeFieldId.toString()}`

Expand Down
16 changes: 5 additions & 11 deletions public-typescript/workOrderOutlook.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
const workOrderMilestoneTypeIdsElement = document.querySelector('#icsFilters--workOrderMilestoneTypeIds');
const calendarLinkElement = document.querySelector('#icsFilters--calendarURL');
function updateCalendarURL() {
let url = window.location.href.slice(0, Math.max(0, window.location.href.indexOf(window.location.pathname) + 1)) +
los.urlPrefix +
'api/' +
los.apiKey +
'/' +
'milestoneICS/' +
'?';
let url = `${window.location.href.slice(0, Math.max(0, window.location.href.indexOf(window.location.pathname) + 1)) + los.urlPrefix}api/${los.apiKey}/milestoneICS/?`;
if (!workOrderTypeIdsElement.disabled &&
workOrderTypeIdsElement.selectedOptions.length > 0) {
url += 'workOrderTypeIds=';
for (const optionElement of workOrderTypeIdsElement.selectedOptions) {
url += optionElement.value + ',';
url += `${optionElement.value},`;
}
url = url.slice(0, -1) + '&';
url = `${url.slice(0, -1)}&`;
}
if (!workOrderMilestoneTypeIdsElement.disabled &&
workOrderMilestoneTypeIdsElement.selectedOptions.length > 0) {
url += 'workOrderMilestoneTypeIds=';
for (const optionElement of workOrderMilestoneTypeIdsElement.selectedOptions) {
url += optionElement.value + ',';
url += `${optionElement.value},`;
}
url = url.slice(0, -1) + '&';
url = `${url.slice(0, -1)}&`;
}
calendarLinkElement.value = url.slice(0, -1);
}
Expand Down
19 changes: 7 additions & 12 deletions public-typescript/workOrderOutlook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,12 @@ declare const exports: Record<string, unknown>
) as HTMLTextAreaElement

function updateCalendarURL(): void {
let url =
let url = `${
window.location.href.slice(
0,
Math.max(0, window.location.href.indexOf(window.location.pathname) + 1)
) +
los.urlPrefix +
'api/' +
los.apiKey +
'/' +
'milestoneICS/' +
'?'
) + los.urlPrefix
}api/${los.apiKey}/milestoneICS/?`

if (
!workOrderTypeIdsElement.disabled &&
Expand All @@ -39,10 +34,10 @@ declare const exports: Record<string, unknown>
url += 'workOrderTypeIds='

for (const optionElement of workOrderTypeIdsElement.selectedOptions) {
url += optionElement.value + ','
url += `${optionElement.value},`
}

url = url.slice(0, -1) + '&'
url = `${url.slice(0, -1)}&`
}

if (
Expand All @@ -52,10 +47,10 @@ declare const exports: Record<string, unknown>
url += 'workOrderMilestoneTypeIds='

for (const optionElement of workOrderMilestoneTypeIdsElement.selectedOptions) {
url += optionElement.value + ','
url += `${optionElement.value},`
}

url = url.slice(0, -1) + '&'
url = `${url.slice(0, -1)}&`
}

calendarLinkElement.value = url.slice(0, -1)
Expand Down
2 changes: 1 addition & 1 deletion public/javascripts/adminOccupancyTypes.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/javascripts/lotEdit.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/javascripts/workOrderOutlook.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 604e122

Please sign in to comment.