linting
parent
d4087caa74
commit
36e2b0f9cc
|
|
@ -1,5 +1,5 @@
|
|||
import type { Request, Response } from 'express';
|
||||
export default function handler(request: Request<unknown, unknown, {
|
||||
workOrderId: string;
|
||||
burialSiteId: string;
|
||||
workOrderId: string;
|
||||
}>, response: Response): void;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ export default function handler(
|
|||
request: Request<
|
||||
unknown,
|
||||
unknown,
|
||||
{ workOrderId: string; burialSiteId: string }
|
||||
{ burialSiteId: string; workOrderId: string }
|
||||
>,
|
||||
response: Response
|
||||
): void {
|
||||
|
|
@ -24,6 +24,7 @@ export default function handler(
|
|||
{
|
||||
limit: -1,
|
||||
offset: 0,
|
||||
|
||||
includeContractCount: false
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,2 +1,5 @@
|
|||
import type { Request, Response } from 'express';
|
||||
export default function handler(request: Request, response: Response): void;
|
||||
export default function handler(request: Request<unknown, unknown, {
|
||||
workOrderCommentId: string;
|
||||
workOrderId: string;
|
||||
}>, response: Response): void;
|
||||
|
|
|
|||
|
|
@ -3,16 +3,21 @@ import type { Request, Response } from 'express'
|
|||
import { deleteRecord } from '../../database/deleteRecord.js'
|
||||
import getWorkOrderComments from '../../database/getWorkOrderComments.js'
|
||||
|
||||
export default function handler(request: Request, response: Response): void {
|
||||
export default function handler(
|
||||
request: Request<
|
||||
unknown,
|
||||
unknown,
|
||||
{ workOrderCommentId: string; workOrderId: string }
|
||||
>,
|
||||
response: Response
|
||||
): void {
|
||||
const success = deleteRecord(
|
||||
'WorkOrderComments',
|
||||
request.body.workOrderCommentId as string,
|
||||
request.body.workOrderCommentId,
|
||||
request.session.user as User
|
||||
)
|
||||
|
||||
const workOrderComments = getWorkOrderComments(
|
||||
request.body.workOrderId as string
|
||||
)
|
||||
const workOrderComments = getWorkOrderComments(request.body.workOrderId)
|
||||
|
||||
response.json({
|
||||
success,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import type { Request, Response } from 'express';
|
||||
export default function handler(request: Request<unknown, unknown, {
|
||||
workOrderId: string;
|
||||
contractId: string;
|
||||
workOrderId: string;
|
||||
}>, response: Response): Promise<void>;
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ export default async function handler(request, response) {
|
|||
}, {
|
||||
limit: -1,
|
||||
offset: 0,
|
||||
includeInterments: true,
|
||||
includeFees: false,
|
||||
includeInterments: true,
|
||||
includeTransactions: false
|
||||
});
|
||||
response.json({
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ export default async function handler(
|
|||
request: Request<
|
||||
unknown,
|
||||
unknown,
|
||||
{ workOrderId: string; contractId: string }
|
||||
{ contractId: string; workOrderId: string }
|
||||
>,
|
||||
response: Response
|
||||
): Promise<void> {
|
||||
|
|
@ -24,8 +24,9 @@ export default async function handler(
|
|||
{
|
||||
limit: -1,
|
||||
offset: 0,
|
||||
includeInterments: true,
|
||||
|
||||
includeFees: false,
|
||||
includeInterments: true,
|
||||
includeTransactions: false
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,2 +1,5 @@
|
|||
import type { Request, Response } from 'express';
|
||||
export default function handler(request: Request, response: Response): Promise<void>;
|
||||
export default function handler(request: Request<unknown, unknown, {
|
||||
workOrderId: string;
|
||||
workOrderMilestoneId: string;
|
||||
}>, response: Response): Promise<void>;
|
||||
|
|
|
|||
|
|
@ -4,18 +4,22 @@ import { deleteRecord } from '../../database/deleteRecord.js'
|
|||
import getWorkOrderMilestones from '../../database/getWorkOrderMilestones.js'
|
||||
|
||||
export default async function handler(
|
||||
request: Request,
|
||||
request: Request<
|
||||
unknown,
|
||||
unknown,
|
||||
{ workOrderId: string; workOrderMilestoneId: string }
|
||||
>,
|
||||
response: Response
|
||||
): Promise<void> {
|
||||
const success = deleteRecord(
|
||||
'WorkOrderMilestones',
|
||||
request.body.workOrderMilestoneId as string,
|
||||
request.body.workOrderMilestoneId,
|
||||
request.session.user as User
|
||||
)
|
||||
|
||||
const workOrderMilestones = await getWorkOrderMilestones(
|
||||
{
|
||||
workOrderId: request.body.workOrderId as string
|
||||
workOrderId: request.body.workOrderId
|
||||
},
|
||||
{
|
||||
orderBy: 'completion'
|
||||
|
|
|
|||
|
|
@ -1,2 +1,4 @@
|
|||
import type { Request, Response } from 'express';
|
||||
export default function handler(request: Request, response: Response): void;
|
||||
export default function handler(request: Request<unknown, unknown, {
|
||||
workOrderId: string;
|
||||
}>, response: Response): void;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,10 @@ import type { Request, Response } from 'express'
|
|||
|
||||
import reopenWorkOrder from '../../database/reopenWorkOrder.js'
|
||||
|
||||
export default function handler(request: Request, response: Response): void {
|
||||
export default function handler(
|
||||
request: Request<unknown, unknown, { workOrderId: string }>,
|
||||
response: Response
|
||||
): void {
|
||||
const success = reopenWorkOrder(
|
||||
request.body.workOrderId as string,
|
||||
request.session.user as User
|
||||
|
|
@ -10,6 +13,6 @@ export default function handler(request: Request, response: Response): void {
|
|||
|
||||
response.json({
|
||||
success,
|
||||
workOrderId: request.body.workOrderId as string
|
||||
workOrderId: request.body.workOrderId
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,2 +1,5 @@
|
|||
import type { Request, Response } from 'express';
|
||||
export default function handler(request: Request, response: Response): Promise<void>;
|
||||
export default function handler(request: Request<unknown, unknown, {
|
||||
workOrderId: string;
|
||||
workOrderMilestoneId: string;
|
||||
}>, response: Response): Promise<void>;
|
||||
|
|
|
|||
|
|
@ -4,17 +4,21 @@ import getWorkOrderMilestones from '../../database/getWorkOrderMilestones.js'
|
|||
import reopenWorkOrderMilestone from '../../database/reopenWorkOrderMilestone.js'
|
||||
|
||||
export default async function handler(
|
||||
request: Request,
|
||||
request: Request<
|
||||
unknown,
|
||||
unknown,
|
||||
{ workOrderId: string; workOrderMilestoneId: string }
|
||||
>,
|
||||
response: Response
|
||||
): Promise<void> {
|
||||
const success = reopenWorkOrderMilestone(
|
||||
request.body.workOrderMilestoneId as string,
|
||||
request.body.workOrderMilestoneId,
|
||||
request.session.user as User
|
||||
)
|
||||
|
||||
const workOrderMilestones = await getWorkOrderMilestones(
|
||||
{
|
||||
workOrderId: request.body.workOrderId as string
|
||||
workOrderId: request.body.workOrderId
|
||||
},
|
||||
{
|
||||
orderBy: 'completion'
|
||||
|
|
|
|||
|
|
@ -372,6 +372,7 @@ export function clearCacheByTableName(
|
|||
messageType: 'clearCache',
|
||||
tableName,
|
||||
timeMillis: Date.now(),
|
||||
|
||||
pid: process.pid
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||
function renderContractFees() {
|
||||
if (contractFees.length === 0) {
|
||||
contractFeesContainerElement.innerHTML = `<div class="message is-info">
|
||||
<p class="message-body">There are no fees associated with this record.</p>
|
||||
<p class="message-body">There are no fees associated with this contract.</p>
|
||||
</div>`;
|
||||
renderContractTransactions();
|
||||
return;
|
||||
|
|
@ -468,7 +468,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||
if (contractTransactions.length === 0) {
|
||||
// eslint-disable-next-line no-unsanitized/property
|
||||
contractTransactionsContainerElement.innerHTML = `<div class="message ${contractFees.length === 0 ? 'is-info' : 'is-warning'}">
|
||||
<p class="message-body">There are no transactions associated with this record.</p>
|
||||
<p class="message-body">There are no transactions associated with this contract.</p>
|
||||
</div>`;
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -120,6 +120,7 @@ declare const exports: Record<string, unknown>
|
|||
.querySelector('form')
|
||||
?.addEventListener('submit', doUpdateQuantity)
|
||||
},
|
||||
|
||||
onremoved() {
|
||||
bulmaJS.toggleHtmlClipped()
|
||||
}
|
||||
|
|
@ -176,7 +177,7 @@ declare const exports: Record<string, unknown>
|
|||
function renderContractFees(): void {
|
||||
if (contractFees.length === 0) {
|
||||
contractFeesContainerElement.innerHTML = `<div class="message is-info">
|
||||
<p class="message-body">There are no fees associated with this record.</p>
|
||||
<p class="message-body">There are no fees associated with this contract.</p>
|
||||
</div>`
|
||||
|
||||
renderContractTransactions()
|
||||
|
|
@ -754,7 +755,7 @@ declare const exports: Record<string, unknown>
|
|||
if (contractTransactions.length === 0) {
|
||||
// eslint-disable-next-line no-unsanitized/property
|
||||
contractTransactionsContainerElement.innerHTML = `<div class="message ${contractFees.length === 0 ? 'is-info' : 'is-warning'}">
|
||||
<p class="message-body">There are no transactions associated with this record.</p>
|
||||
<p class="message-body">There are no transactions associated with this contract.</p>
|
||||
</div>`
|
||||
|
||||
return
|
||||
|
|
|
|||
Loading…
Reference in New Issue