|
|
|
@@ -7,7 +7,7 @@ import { QueryBuilder } from "./query"; |
|
|
|
const client = new KintoneRestAPIClient(); |
|
|
|
|
|
|
|
export const get車室契約情報 = async ( |
|
|
|
レコード番号: number |
|
|
|
レコード番号: number | string |
|
|
|
): Promise<車室契約情報> => { |
|
|
|
const { record } = await client.record.getRecord<車室契約情報>({ |
|
|
|
app: AppID.車室契約情報, |
|
|
|
@@ -20,7 +20,7 @@ export const get車室契約情報 = async ( |
|
|
|
type get車室契約情報一覧オプション = { |
|
|
|
駐車場名?: string; |
|
|
|
車室番号?: number | string; |
|
|
|
契約中のみ?: boolean; |
|
|
|
契約中のみ?: Date; |
|
|
|
}; |
|
|
|
export const get車室契約情報一覧 = async ({ |
|
|
|
駐車場名, |
|
|
|
@@ -35,9 +35,9 @@ export const get車室契約情報一覧 = async ({ |
|
|
|
if (車室番号) { |
|
|
|
builder.where(車室契約情報フィールド名.車室番号, 車室番号); |
|
|
|
} |
|
|
|
if (契約中のみ) { |
|
|
|
const todayStr = formatDateStr(now()); |
|
|
|
builder.where(車室契約情報フィールド名.解約日, todayStr, ">"); |
|
|
|
if (契約中のみ instanceof Date) { |
|
|
|
const 基準日文字列 = formatDateStr(契約中のみ); |
|
|
|
builder.where(車室契約情報フィールド名.解約日, 基準日文字列, ">"); |
|
|
|
} |
|
|
|
|
|
|
|
const record = await client.record.getAllRecords<車室契約情報>({ |
|
|
|
|