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

View File

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

View File

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