feat: implement the enforcement for new invitation page (#2628)

Added new invitation code implementation
This commit is contained in:
HGZ-20
2024-01-22 02:25:13 +08:00
committed by GitHub
parent de2932b5fb
commit d7c40459c0
30 changed files with 306 additions and 5 deletions

View File

@ -107,7 +107,7 @@ class InvitationEditPage extends React.Component {
{Setting.getLabel(i18next.t("general:Organization"), i18next.t("general:Organization - Tooltip"))} :
</Col>
<Col span={22} >
<Select virtual={false} style={{width: "100%"}} disabled={!Setting.isAdminUser(this.props.account) || isCreatedByPlan} value={this.state.invitation.owner} onChange={(value => {this.updateInvitationField("owner", value);})}>
<Select virtual={false} style={{width: "100%"}} disabled={!Setting.isAdminUser(this.props.account) || isCreatedByPlan} value={this.state.invitation.owner} onChange={(value => {this.updateInvitationField("owner", value); this.getApplicationsByOrganization(value);})}>
{
this.state.organizations.map((organization, index) => <Option key={index} value={organization.name}>{organization.name}</Option>)
}
@ -171,8 +171,10 @@ class InvitationEditPage extends React.Component {
<Col span={22} >
<Select virtual={false} style={{width: "100%"}} value={this.state.invitation.application}
onChange={(value => {this.updateInvitationField("application", value);})}
options={this.state.applications.map((application) => Setting.getOption(application.name, application.name))
} />
options={[
{label: "All", value: i18next.t("general:All")},
...this.state.applications.map((application) => Setting.getOption(application.name, application.name)),
]} />
</Col>
</Row>
<Row style={{marginTop: "20px"}} >