fix error
This commit is contained in:
@@ -168,7 +168,6 @@ const extractNoSubTableFields = (layout: Layout, baseFilter: FieldType[] | undef
|
||||
|
||||
export function getFieldObj(fieldCode: string, { fields }: FieldsInfo, subTableCode?: string) {
|
||||
const meta = getMeta(fields, subTableCode);
|
||||
if (!meta) return '';
|
||||
return meta[fieldCode];
|
||||
}
|
||||
|
||||
@@ -177,7 +176,6 @@ export function getMeta(fields: Properties, subTableCode?: string) {
|
||||
return fields;
|
||||
}
|
||||
let meta = fields;
|
||||
if (!meta) return fields;
|
||||
const table = meta[subTableCode];
|
||||
if (isType.SUBTABLE(table)) {
|
||||
meta = table.fields;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import type { CalcType } from '@/types/my-kintone';
|
||||
import { isType, type FieldType, type OneOf } from './kintone-rest-api-client';
|
||||
|
||||
type CalcType = 'NUMBER' | 'NUMBER_DIGIT' | 'DATETIME' | 'DATE' | 'TIME' | 'HOUR_MINUTE' | 'DAY_HOUR_MINUTE';
|
||||
|
||||
export type LeftCalcJoinType = Record<CalcType, FieldType[]>;
|
||||
|
||||
export function isForceDisable(field: OneOf) {
|
||||
|
||||
@@ -54,7 +54,7 @@ export const types = typeNames.reduce(
|
||||
|
||||
type ExtractOneOf<T extends FieldType> = Extract<OneOf, { type: T }>;
|
||||
function createTypeGuard<T extends FieldType>(type: T) {
|
||||
return (value: OneOf): value is ExtractOneOf<T> => value.type === type;
|
||||
return (value: OneOf): value is ExtractOneOf<T> => value?.type === type;
|
||||
}
|
||||
|
||||
export const isType = Object.fromEntries(
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
export interface KucEvent<T> {
|
||||
detail: T;
|
||||
}
|
||||
|
||||
export type CalcType = 'NUMBER' | 'NUMBER_DIGIT' | 'DATETIME' | 'DATE' | 'TIME' | 'HOUR_MINUTE' | 'DAY_HOUR_MINUTE';
|
||||
|
||||
Reference in New Issue
Block a user