1 <div id="staff-userProfile" class="page-layout simple tabbed" layout="column">
3 <div class="header md-accent-bg" layout="row" layout-align="start center">
4 <div class="white-fg" layout="row" layout-align="start center" flex>
6 class="goto-userProfiles-button md-icon-button"
7 aria-label="Go to userProfiles"
8 ng-click="vm.gotoUserProfiles()"
10 translate-attr-aria-label="STAFF.GO_TO_USERPROFILES"
12 <md-icon md-font-icon="icon-arrow-left"></md-icon>
15 <div layout="row" layout-align="start center">
16 <div class="userProfile-image" hide-xs>
17 <img ng-src="assets/images/business/userProfiles.jpg" />
20 <div layout="column" layout-align="start start">
22 #{{vm.userProfile.id}}
23 <span ng-if="vm.userProfile.name">{{vm.userProfile.name}}</span>
25 <div class="subtitle secondary-text">
26 <span translate="STAFF.CREATED_AT"></span>
27 <span>{{vm.userProfile.createdAt | date:'medium'}}</span>
33 <div ng-cloak ng-if="vm.crudPermissions.canEdit">
35 ng-click="vm.clonedialog(vm.userProfile, $event)"
36 class="md-fab md-amber-500-bg md-icon-button"
40 ><span translate="STAFF.CLONE_USERPROFILE"></span
42 <md-icon md-font-icon="icon-content-duplicate"></md-icon>
48 ng-click="vm.saveUserProfile()"
49 ng-if="vm.crudPermissions.canEdit"
50 class="send-button md-accent md-raised"
51 ng-disabled="(generalForm.$invalid) || (modulesForm.$invalid)"
52 translate="STAFF.SAVE"
53 translate-attr-aria-label="STAFF.SAVE"
64 md-selected="vm.selectedTab"
65 md-stretch-tabs="always"
72 <span translate="STAFF.SETTINGS">SETTINGS</span>
76 class="userProfile-detail-form-container general md-background-bg md-whiteframe-1dp"
78 <div class="pb-16" layout="row" layout-align="start center">
79 <div class="h2 secondary-text" translate="STAFF.GENERAL">
83 <form name="generalForm" novalidate>
84 <md-input-container class="md-block">
85 <label translate="STAFF.NAME">Name</label>
89 ng-model="vm.userProfile.name"
96 ng-messages="generalForm['name'].$error"
97 ng-show="generalForm['name'].$touched"
100 <div ng-message="required">
101 <span translate="STAFF.ERRORS.NAME_REQUIRED"
102 >Name field is required</span
106 </md-input-container>
107 <md-input-container class="md-block">
108 <label translate="STAFF.DESCRIPTION">Description</label>
112 ng-model="vm.userProfile.description"
113 ng-disabled="!vm.crudPermissions.canEdit"
117 ng-messages="generalForm['description'].$error"
118 ng-show="generalForm['description'].$touched"
121 <div ng-message="required">
122 <span translate="STAFF.ERRORS.DESCRIPTION_REQUIRED"
123 >Description field is required</span
127 </md-input-container>
128 <md-input-container class="md-block">
129 <label translate="STAFF.CRUDPERMISSIONS">CrudPermissions</label>
131 name="crudPermissions"
132 ng-model="vm.userProfile.crudPermissions"
135 ng-disabled="!vm.crudPermissions.canEdit"
137 <md-option ng-value="'r'" disabled>
138 {{ 'STAFF.READ_PERMISSION' | translate }}
141 <md-option ng-value="'e'">
142 {{ 'STAFF.EDIT_PERMISSION' | translate }}
145 <md-option ng-value="'d'">
146 {{ 'STAFF.DELETE_PERMISSION' | translate }}
150 ng-messages="generalForm['crudPermissions'].$error"
151 ng-show="generalForm['crudPermissions'].$touched"
154 <div ng-message="required">
155 <span translate="STAFF.ERRORS.CRUDPERMISSIONS_REQUIRED"
156 >CrudPermissions field is required</span
160 </md-input-container>
167 <span translate="STAFF.PERMISSIONS">PERMISSIONS</span>
171 class="userProfile-detail-form-container modules md-background-bg md-whiteframe-1dp"
173 <div class="pb-16" layout="row" layout-align="start center">
174 <div class="h2 secondary-text" translate="STAFF.MODULES">
179 ng-controller="UserProfilePermissionsController as vm_pc"
180 ng-init="vm_pc.init(vm.userProfile, vm.license)"
181 class="userProfile-detail-form-container"
189 md-row-height-gt-xs="2:1"
190 md-row-height-gt-sm="2:1"
191 md-row-height-gt-md="3:1"
198 ng-repeat="father in vm_pc.modules"
199 ng-if="vm_pc.userProfile.role !== 'admin' && !father.permissions.hidden"
212 class="md-avatar-icon auto-size"
213 md-font-icon="{{father.icon}}"
214 ng-class="{ true: father.status.color }[true]"
216 <md-tooltip>{{ father.status.info }}</md-tooltip>
218 <md-card-header-text layout-align="center start">
219 <span class="md-title" translate="{{father.translate}}"
220 >{{ father.title }}</span
222 </md-card-header-text>
226 ng-init="vm_pc.checkSectionResources(father)"
227 ng-if="father.status.tag != 'unlicensed'"
230 class="auto-height no-margin"
231 ng-model="father.allResourcesEnabled"
232 ng-change="vm_pc.onChangeEnableAllResources(father)"
233 aria-label="Enable all"
236 class="md-mini auto-width"
238 ng-click="vm_pc.manageResources(father)"
239 ng-hide="father.permissions && !father.permissions.association"
242 >{{'STAFF.PERMISSIONS_MANAGE' | translate}}
244 <md-icon md-font-icon="icon-cog"></md-icon>
248 ng-if="father.status.tag === 'unlicensed'"
249 layout-align="center end"
251 <span class="md-subhead red-A700-fg"
252 >{{ father.status.name }}</span
254 </md-card-header-text>