userrelation upsert 申明

This commit is contained in:
Wang Kejun 2023-04-12 19:48:58 +08:00
parent fc24142008
commit 903d6738a4
3 changed files with 22 additions and 17 deletions

View File

@ -1,9 +1,11 @@
/// <reference types="react" /> /// <reference types="react" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../general-app-domain").EntityDict, keyof import("../../../general-app-domain").EntityDict, false, { import { EntityDict } from '../../../general-app-domain';
entity: StringConstructor; import { QrCodeType } from '../../../types/Config';
entityId: StringConstructor; declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, keyof EntityDict, false, {
relations: ArrayConstructor; entity: keyof EntityDict;
redirectToAfterConfirm: ObjectConstructor; entityId: string;
qrCodeType: StringConstructor; relations: string[];
redirectToAfterConfirm: import("../../../general-app-domain/UserEntityGrant/Schema").RedirectToProps | null | undefined;
qrCodeType: QrCodeType;
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>; }>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
export default _default; export default _default;

View File

@ -11,11 +11,11 @@ exports.default = OakComponent({
grantMethodCount: 0, grantMethodCount: 0,
}, },
properties: { properties: {
entity: String, entity: '',
entityId: String, entityId: '',
relations: Array, relations: [],
redirectToAfterConfirm: Object, redirectToAfterConfirm: {},
qrCodeType: String, qrCodeType: '',
}, },
lifetimes: { lifetimes: {
ready: function () { ready: function () {

View File

@ -1,5 +1,7 @@
import assert from 'assert'; import assert from 'assert';
import { WebConfig } from '../../../entities/Application'; import { WebConfig } from '../../../entities/Application';
import { EntityDict } from '../../../general-app-domain';
import { QrCodeType } from '../../../types/Config';
export default OakComponent({ export default OakComponent({
isList: false, isList: false,
@ -10,17 +12,18 @@ export default OakComponent({
grantMethodCount: 0, grantMethodCount: 0,
}, },
properties: { properties: {
entity: String, entity: '' as keyof EntityDict,
entityId: String, entityId: '',
relations: Array, relations: [] as string[],
redirectToAfterConfirm: Object, redirectToAfterConfirm:
qrCodeType: String, {} as EntityDict['userEntityGrant']['Schema']['redirectTo'],
qrCodeType: '' as QrCodeType,
}, },
lifetimes: { lifetimes: {
ready() { ready() {
const isRoot = this.features.token.isRoot(); const isRoot = this.features.token.isRoot();
const application = this.features.application.getApplication(); const application = this.features.application.getApplication();
const { type, config } = application!; // 这个页面总不可能是第一个页面吧application肯定初始化完成了 const { type, config } = application!; // 这个页面总不可能是第一个页面吧application肯定初始化完成了
let grantByUserEntityGrant = false, let grantByUserEntityGrant = false,
grantByMobile = false, grantByMobile = false,
grantByEmail = false; grantByEmail = false;