Skip to content
This repository was archived by the owner on Apr 10, 2021. It is now read-only.

244 #256

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

244 #256

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions raw-cms-app/src/modules/core/assets/i18n/i18n.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"fields": "Fields",
"name": "Name",
"newTitle": "New entity",
"requiredNameMsg": "Name is required",
"updateTitle": "Entity {name}",
"fieldEdit": {
"nameLabel": "Name",
Expand Down Expand Up @@ -68,7 +67,7 @@
"deleteConfirmMsgTpl": "Are you sure you want to delete lambda {name}?",
"deleteErrorMsgTpl": "An error occurred while deleting lambda {name}.",
"deleteSuccessMsgTpl": "Lambda {name} was deleted.",
"emptyMsg": "There are no lambdas yet. Add some with the button below!",
"empt1yMsg": "There are no lambdas yet. Add some with the button below!",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo error?

"title": "Lambdas",
"details": {
"nameLabel": "Name",
Expand All @@ -92,7 +91,12 @@
"users": {
"detail": {
"newTitle": "New user",
"updateTitle": "User {name}"
"newEmail": "New Email",
"newRoles": "New Roles",
"updateTitle": "User {name}",
"requiredNameMsg": "Name is required",
"requiredEmailMsg": "Email is required",
"requiredRoleslMsg": "Roles is required"
},
"deleteConfirmMsgTpl": "Are you sure you want to delete user {name}?",
"deleteErrorMsgTpl": "An error occurred while deleting user {name}.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ const _UserDetailsWrapperDef = async () => {
return {
data: function() {
return {
activeTabId: 'tabFormly',
apiService: userService,
userRoles: this.$slots,
};
},
extends: rawCmsDetailEditDef,
Expand All @@ -24,6 +26,18 @@ const _UserDetailsDef = async () => {
components: {
DetailWrapper: detailWrapperDef,
},
data: function() {
return {
nameRules: [v => !!v || this.$t('core.users.detail.requiredNameMsg')],
emailRules: [v => !!v || this.$t('core.users.detail.requiredEmailMsg')],
emailRules: [v => !!v || this.$t('core.users.detail.requiredRoleslMsg')],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the rule for role has emailRules name?

};
},
computed: {
userRoles: function() {
return this.$slots;
},
},
props: detailWrapperDef.extends.props,
template: tpl,
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,47 @@
<detail-wrapper v-on="$listeners" v-bind="$props"></detail-wrapper>
<detail-wrapper v-on="$listeners" v-bind="$props">
<template slot="custom-tabs">
<v-tab href="#tabFormly">
{{ $t('core.common.editText') }}
<v-icon>mdi-pen</v-icon>
</v-tab>
</template>

<template v-slot:custom-tab-items="{ value }">
<v-tab-item value="tabFormly">
<v-card flat tile>
<v-form>
<v-container fluid>
<v-row class="px-3">
<v-col cols="12" sm="6">
<v-text-field
v-model="value.UserName"
:rules="nameRules"
:label="$t('core.users.detail.newTitle')"
required
></v-text-field>
</v-col>
<v-col cols="12" sm="6">
<v-text-field
v-model="value.Email"
:rules="emailRules"
:label="$t('core.users.detail.newEmail')"
required
></v-text-field>
</v-col>
</v-row>
<v-row class="px-3">
<v-col>
<v-text-field
v-model="value.Roles.join(',')"
:rules="roleRules"
:label="$t('core.users.detail.newRoles')"
required
></v-text-field>
</v-col>
</v-row>
</v-container>
</v-form>
</v-card>
</v-tab-item>
</template>
</detail-wrapper>