deepsource-autofix-76c6eb20
Dan Gowans 2022-11-01 15:08:14 -04:00
parent 2586fb9104
commit 1797567a37
8 changed files with 8 additions and 9 deletions

View File

@ -3,6 +3,7 @@ import { getMaps } from "../../helpers/lotOccupancyDB/getMaps.js";
import * as cacheFunctions from "../../helpers/functions.cache.js";
export const handler = (request, response) => {
const lot = {
lotId: -1,
lotOccupancies: []
};
const maps = getMaps();

View File

@ -9,6 +9,7 @@ import * as recordTypes from "../../types/recordTypes";
export const handler: RequestHandler = (request, response) => {
const lot: recordTypes.Lot = {
lotId: -1,
lotOccupancies: []
};

View File

@ -26,7 +26,7 @@ export const getFeesByFeeCategory = (lotOccupancy, feeCategory, feeCategoryConta
};
export const getTransactionTotal = (lotOccupancy) => {
let transactionTotal = 0;
for (const transaction of lotOccupancy.lotOccupancyTransactions) {
for (const transaction of (lotOccupancy.lotOccupancyTransactions || [])) {
transactionTotal += transaction.transactionAmount;
}
return transactionTotal;

View File

@ -51,7 +51,7 @@ export const getFeesByFeeCategory = (
export const getTransactionTotal = (lotOccupancy: recordTypes.LotOccupancy) => {
let transactionTotal = 0;
for (const transaction of lotOccupancy.lotOccupancyTransactions) {
for (const transaction of (lotOccupancy.lotOccupancyTransactions || [])) {
transactionTotal += transaction.transactionAmount;
}

View File

@ -24,10 +24,7 @@ export const addWorkOrderLotOccupancy = (
" where workOrderId = ?" +
" and lotOccupancyId = ?"
)
.get(
workOrderLotOccupancyForm.workOrderId,
workOrderLotOccupancyForm.lotOccupancyId
);
.get(workOrderLotOccupancyForm.workOrderId, workOrderLotOccupancyForm.lotOccupancyId);
if (row) {
if (row.recordDelete_timeMillis) {

View File

@ -49,7 +49,7 @@ export interface LotStatus extends Record {
orderNumber?: number;
}
export interface Lot extends Record {
lotId?: number;
lotId: number;
lotName?: string;
lotTypeId?: number;
lotType?: string;

View File

@ -66,7 +66,7 @@ export interface LotStatus extends Record {
}
export interface Lot extends Record {
lotId?: number;
lotId: number;
lotName?: string;
lotTypeId?: number;

View File

@ -37,7 +37,7 @@
</h1>
<form id="form--lot">
<input id="lot--lotId" name="lotId" type="hidden" value="<%= lot.lotId %>" />
<input id="lot--lotId" name="lotId" type="hidden" value="<%= isCreate ? "" : lot.lotId %>" />
<div class="panel">
<div class="panel-block is-block">