2 id="integrations-zendeskAccount"
3 class="page-layout simple tabbed"
7 <div class="header md-accent-bg" layout="row" layout-align="start center">
8 <div class="white-fg" layout="row" layout-align="start center" flex>
10 class="goto-zendeskAccounts-button md-icon-button"
11 aria-label="Go to zendeskAccounts"
12 ng-click="vm.gotoZendeskAccounts()"
14 translate-attr-aria-label="INTEGRATIONS.GO_TO_ZENDESKACCOUNTS"
16 <md-icon md-font-icon="icon-arrow-left"></md-icon>
19 <div layout="row" layout-align="start center">
20 <div class="zendeskAccount-image" hide-xs>
21 <img ng-src="assets/images/business/zendeskAccounts.jpg" />
24 <div layout="column" layout-align="start start">
26 #{{vm.zendeskAccount.id}}
27 <span ng-if="vm.zendeskAccount.name"
28 >{{vm.zendeskAccount.name}}</span
31 <div class="subtitle secondary-text">
32 <span translate="INTEGRATIONS.CREATED_AT"></span>
33 <span>{{vm.zendeskAccount.createdAt | date:'medium'}}</span>
41 ng-click="vm.saveZendeskAccount()"
42 ng-if="vm.crudPermissions.canEdit"
43 class="send-button md-accent md-raised"
44 ng-disabled="(generalForm.$invalid) || (zendeskConfigurationsForm.$invalid)"
45 translate="INTEGRATIONS.SAVE"
46 translate-attr-aria-label="INTEGRATIONS.SAVE"
57 md-selected="vm.selectedTab"
58 md-stretch-tabs="always"
65 <span translate="INTEGRATIONS.ACCOUNT">ACCOUNT</span>
69 class="zendeskAccount-detail-form-container general md-background-bg md-whiteframe-1dp"
71 <div class="pb-16" layout="row" layout-align="start center">
72 <div class="h2 secondary-text" translate="INTEGRATIONS.GENERAL">
76 <form name="generalForm" novalidate>
77 <md-input-container class="md-block">
78 <label translate="INTEGRATIONS.NAME">Name</label>
82 ng-model="vm.zendeskAccount.name"
85 ng-disabled="!vm.crudPermissions.canEdit"
89 ng-messages="generalForm['name'].$error"
90 ng-show="generalForm['name'].$touched"
93 <div ng-message="required">
94 <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED"
95 >Name field is required</span
100 <md-input-container class="md-block">
101 <label translate="INTEGRATIONS.TYPE">Type</label>
104 ng-model="vm.zendeskAccount.type"
106 ng-disabled="!vm.crudPermissions.canEdit"
108 <md-option ng-value="'integrationTab'">
109 {{ 'INTEGRATIONS.INTEGRATION_TAB' | translate }}
112 <md-option ng-value="'newTab'">
113 {{ 'INTEGRATIONS.NEW_TAB' | translate }}
117 ng-messages="generalForm['type'].$error"
118 ng-show="generalForm['type'].$touched"
121 <div ng-message="required">
122 <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED"
123 >Type field is required</span
127 </md-input-container>
128 <md-input-container class="md-block">
129 <label translate="INTEGRATIONS.USERNAME">Username</label>
133 ng-model="vm.zendeskAccount.username"
135 ng-disabled="!vm.crudPermissions.canEdit"
139 ng-messages="generalForm['username'].$error"
140 ng-show="generalForm['username'].$touched"
143 <div ng-message="required">
144 <span translate="INTEGRATIONS.ERRORS.USERNAME_REQUIRED"
145 >Username field is required</span
149 </md-input-container>
150 <md-input-container class="md-block">
151 <label translate="INTEGRATIONS.URI">Uri</label>
155 ng-model="vm.zendeskAccount.remoteUri"
157 ng-disabled="!vm.crudPermissions.canEdit"
161 ng-messages="generalForm['remoteUri'].$error"
162 ng-show="generalForm['remoteUri'].$touched"
165 <div ng-message="required">
166 <span translate="INTEGRATIONS.ERRORS.URI_REQUIRED"
167 >Uri field is required</span
170 <div ng-message="url">
171 <span translate="INTEGRATIONS.ERRORS.URI_MUST_VALID_URL"
172 >Uri must be a valid url http://www.xcally.com</span
176 </md-input-container>
177 <md-input-container class="md-block">
178 <label translate="INTEGRATIONS.AUTHTYPE">AuthType</label>
181 ng-model="vm.zendeskAccount.authType"
183 ng-disabled="!vm.crudPermissions.canEdit"
185 <md-option ng-value="'password'">Password</md-option>
186 <md-option ng-value="'token'">Token</md-option>
189 ng-messages="generalForm['authType'].$error"
190 ng-show="generalForm['authType'].$touched"
193 <div ng-message="required">
194 <span translate="INTEGRATIONS.ERRORS.AUTHTYPE_REQUIRED"
195 >AuthType field is required</span
199 </md-input-container>
202 ng-if="vm.zendeskAccount.authType == 'password'"
204 <label translate="INTEGRATIONS.PASSWORD">Password</label>
208 ng-model="vm.zendeskAccount.password"
209 placeholder="Password"
211 translate-attr-placeholder="INTEGRATIONS.PASSWORD"
214 <div ng-messages="generalForm['password'].$error" role="alert">
215 <div ng-message="required">
216 <span translate="INTEGRATIONS.ERRORS.PASSWORD_REQUIRED"
217 >Password field is required</span
220 <div ng-message="pattern">
222 translate="INTEGRATIONS.ERRORS.SECURE_PASSWORD_PATTERN"
223 >Must contain at least 8 characters, with a minimum of 1
224 lowercase letter, 1 uppercase letter, 1 numeric character
225 and 1 special character ~!?*@#$%^&-_=+[{]}.</span
229 </md-input-container>
232 ng-if="vm.zendeskAccount.authType == 'token'"
235 <label translate="INTEGRATIONS.TOKEN">Token</label>
239 ng-model="vm.zendeskAccount.token"
241 ng-disabled="!vm.crudPermissions.canEdit"
245 ng-messages="generalForm['token'].$error"
246 ng-show="generalForm['token'].$touched"
249 <div ng-message="required">
250 <span translate="INTEGRATIONS.ERRORS.TOKEN_REQUIRED"
251 >Token field is required</span
255 </md-input-container>
256 <md-input-container class="md-block">
257 <label translate="INTEGRATIONS.MOTIONPROXYADDRESS"
258 >MotionProxyAddress</label
263 ng-model="vm.zendeskAccount.serverUrl"
264 ng-disabled="!vm.crudPermissions.canEdit"
268 <span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span>
271 ng-messages="generalForm['serverUrl'].$error"
272 ng-show="generalForm['serverUrl'].$touched"
275 <div ng-message="required">
277 translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED"
278 >MotionProxyAddress field is required</span
281 <div ng-message="url">
283 translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL"
284 >MotionProxyAddress must be a valid url
285 http://www.xcally.com</span
289 </md-input-container>
290 <md-input-container class="md-block">
291 <label translate="INTEGRATIONS.DESCRIPTION">Description</label>
295 ng-model="vm.zendeskAccount.description"
296 ng-disabled="!vm.crudPermissions.canEdit"
300 ng-messages="generalForm['description'].$error"
301 ng-show="generalForm['description'].$touched"
304 <div ng-message="required">
305 <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED"
306 >Description field is required</span
310 </md-input-container>
317 <span translate="INTEGRATIONS.CONFIGURATIONS">CONFIGURATIONS</span>
321 class="zendeskAccount-detail-form-container zendeskconfigurations md-background-bg md-whiteframe-1dp"
323 <div class="pb-16" layout="row" layout-align="start center">
325 class="h2 secondary-text"
326 translate="INTEGRATIONS.ZENDESKCONFIGURATIONS"
328 ZENDESKCONFIGURATIONS
332 ng-controller="ZendeskAccountConfigurationsController as vm_cc"
333 ng-init="vm_cc.init(vm.zendeskAccount, vm.crudPermissions)"
336 <md-card class="md-whiteframe-1dp" flex="30">
337 <div layout="row" layout-align="center center">
338 <md-subheader flex="75" class="md-no-sticky"
339 >{{ 'INTEGRATIONS.CONFIGURATIONS' | translate
344 ng-if="vm_cc.crudPermissions.canEdit"
345 ng-click="vm_cc.createOrEditZendeskConfiguration($event)"
346 class="md-icon-button"
347 aria-label="create zendeskConfiguration"
349 <md-icon md-font-icon="icon-plus"></md-icon>
355 layout-align="center center"
356 ng-repeat="zendeskConfiguration in vm_cc.zendeskConfigurations"
358 md-colors="{background: (vm_cc.selectedZendeskConfiguration == $index ? 'accent' : 'grey-A100')}"
359 ng-click="vm_cc.getZendeskConfiguration($index)"
361 <span class="text-truncate" flex="80"
362 >{{ zendeskConfiguration.name }}</span
364 <md-menu ng-if="vm_cc.crudPermissions.canDelete">
366 class="md-icon-button"
369 translate-attr-aria-label="INTEGRATIONS.MORE"
370 ng-click="$mdOpenMenu($event)"
372 <md-icon md-font-icon="icon-dots-vertical"></md-icon>
374 <md-menu-content width="3">
375 <md-menu-item ng-if="vm_cc.crudPermissions.canDelete">
377 ng-click="vm_cc.deleteZendeskConfiguration($event, zendeskConfiguration)"
378 translate="INTEGRATIONS.DELETE_ZENDESKCONFIGURATION"
380 Delete ZendeskConfiguration
389 <md-card class="md-whiteframe-1dp" flex="65">
391 ng-if="vm_cc.zendeskConfigurations.length"
396 <span translate="INTEGRATIONS.SUBJECTS">SUBJECTS</span>
400 class="md-table-toolbar md-default no-padding"
401 ng-hide="vm_cc.selectedSubjects.length"
403 <div class="md-toolbar-tools">
406 on-search="vm_cc.query.subject = query"
407 on-collapse="vm_cc.query.subject = undefined"
411 ng-if="vm_cc.crudPermissions.canEdit"
412 class="md-icon-button"
413 ng-click="vm_cc.createOrEditSubject($event)"
414 aria-label="add subject"
416 translate-attr-label="INTEGRATIONS.ADD_SUBJECT"
418 <md-icon md-font-icon="icon-plus"></md-icon>
423 class="md-table-toolbar md-accent"
424 ng-show="vm_cc.selectedSubjects.length"
426 <div class="md-toolbar-tools">
427 <span class="md-subhead"
428 >{{vm_cc.selectedSubjects.length}}
429 {{vm_cc.selectedSubjects.length > 1 ? 'items' :
430 'item'}} selected</span
434 ng-if="vm_cc.crudPermissions.canDelete"
435 class="md-icon-button"
436 ng-click="vm_cc.deleteSelectedSubjects($event)"
437 aria-label="delete selected"
439 translate-attr-label="INTEGRATIONS.DELETE_SELECTED"
441 <md-icon md-font-icon="icon-delete"></md-icon>
446 class="md-whiteframe-1dp padding-horizontal"
452 ng-model="vm_cc.selectedSubjects"
457 {{ 'INTEGRATIONS.ID' | translate }}
460 {{ 'INTEGRATIONS.TYPE' | translate }}
463 {{ 'INTEGRATIONS.CONTENT' | translate }}
465 <th md-column width="10px"></th>
473 ng-repeat="subject in vm_cc.subjects | filter: vm_cc.query.subject"
476 ng-click="vm_cc.createOrEditSubject($event, subject)"
483 ng-click="vm_cc.createOrEditSubject($event, subject)"
487 <span ng-if="subject.FieldId"
488 >{{subject.nameField ||
489 subject.idField}}</span
491 <span ng-if="!subject.FieldId"
492 >{{subject.type}}</span
496 ng-switch="subject.type"
497 ng-click="vm_cc.createOrEditSubject($event, subject)"
500 <span ng-switch-when="string"
501 >{{subject.content}}</span
504 ng-switch-when="variable"
506 >{{subject.variableName}}</span
509 ng-switch-when="customVariable"
512 vm_cc.variablesById[subject.VariableId].name
515 <span ng-switch-when="keyValue">
517 <span ng-switch="description.keyType">
518 <span ng-switch-when="string"
519 >{{subject.keyContent}}</span
522 ng-switch-when="variable"
524 >{{subject.variableName}}</span
527 ng-switch-when="customVariable"
530 vm_cc.variablesById[subject.VariableId].name
535 <span ng-switch-default
536 >{{subject.content}}</span
542 ng-if="!vm_cc.crudPermissions.readOnly"
546 class="md-icon-button"
549 translate-attr-aria-label="INTEGRATIONS.MORE"
550 ng-click="$mdOpenMenu($event)"
553 md-font-icon="icon-dots-vertical"
557 <md-menu-content width="3">
559 ng-if="vm_cc.crudPermissions.canEdit"
562 ng-click="vm_cc.createOrEditSubject($event, subject)"
563 translate="INTEGRATIONS.EDIT_SUBJECT"
569 ng-if="vm_cc.crudPermissions.canDelete"
572 ng-click="vm_cc.deleteSubjectConfirm($event, subject)"
573 translate="INTEGRATIONS.DELETE_SUBJECT"
584 </md-table-container>
590 <span translate="INTEGRATIONS.DESCRIPTIONS"
596 class="md-table-toolbar md-default no-padding"
597 ng-hide="vm_cc.selectedDescriptions.length"
599 <div class="md-toolbar-tools">
602 on-search="vm_cc.query.description = query"
603 on-collapse="vm_cc.query.description = undefined"
607 ng-if="vm_cc.crudPermissions.canEdit"
608 class="md-icon-button"
609 ng-click="vm_cc.createOrEditDescription($event)"
610 aria-label="add description"
612 translate-attr-label="INTEGRATIONS.ADD_DESCRIPTION"
614 <md-icon md-font-icon="icon-plus"></md-icon>
619 class="md-table-toolbar md-accent"
620 ng-show="vm_cc.selectedDescriptions.length"
622 <div class="md-toolbar-tools">
623 <span class="md-subhead"
624 >{{vm_cc.selectedDescriptions.length}}
625 {{vm_cc.selectedDescriptions.length > 1 ? 'items' :
626 'item'}} selected</span
630 ng-if="vm_cc.crudPermissions.canDelete"
631 class="md-icon-button"
632 ng-click="vm_cc.deleteSelectedDescriptions($event)"
633 aria-label="delete selected"
635 translate-attr-label="INTEGRATIONS.DELETE_SELECTED"
637 <md-icon md-font-icon="icon-delete"></md-icon>
642 class="md-whiteframe-1dp padding-horizontal"
648 ng-model="vm_cc.selectedDescriptions"
653 {{ 'INTEGRATIONS.ID' | translate }}
656 {{ 'INTEGRATIONS.TYPE' | translate }}
659 {{ 'INTEGRATIONS.CONTENT' | translate }}
661 <th md-column width="10px"></th>
667 md-select="description"
669 ng-repeat="description in vm_cc.descriptions | filter: vm_cc.query.description"
672 ng-click="vm_cc.createOrEditDescription($event, description)"
679 ng-click="vm_cc.createOrEditDescription($event, description)"
683 <span ng-if="description.FieldId"
684 >{{description.nameField ||
685 description.idField}}</span
687 <span ng-if="!description.FieldId"
688 >{{description.type}}</span
692 ng-switch="description.type"
693 ng-click="vm_cc.createOrEditDescription($event, description)"
696 <span ng-switch-when="string"
697 >{{description.content}}</span
700 ng-switch-when="variable"
702 >{{description.variableName}}</span
705 ng-switch-when="customVariable"
708 vm_cc.variablesById[description.VariableId].name
711 <span ng-switch-when="keyValue">
713 <span ng-switch="description.keyType">
714 <span ng-switch-when="string"
715 >{{description.keyContent}}</span
718 ng-switch-when="variable"
720 >{{description.variableName}}</span
723 ng-switch-when="customVariable"
726 vm_cc.variablesById[description.VariableId].name
731 <span ng-switch-default
732 >{{description.content}}</span
738 ng-if="!vm_cc.crudPermissions.readOnly"
742 class="md-icon-button"
745 translate-attr-aria-label="INTEGRATIONS.MORE"
746 ng-click="$mdOpenMenu($event)"
749 md-font-icon="icon-dots-vertical"
753 <md-menu-content width="3">
755 ng-if="vm_cc.crudPermissions.canEdit"
758 ng-click="vm_cc.createOrEditDescription($event, description)"
759 translate="INTEGRATIONS.EDIT_DESCRIPTION"
765 ng-if="vm_cc.crudPermissions.canDelete"
768 ng-click="vm_cc.deleteDescriptionConfirm($event, description)"
769 translate="INTEGRATIONS.DELETE_DESCRIPTION"
780 </md-table-container>
786 <span translate="INTEGRATIONS.FIELDS">FIELDS</span>
790 class="md-table-toolbar md-default no-padding"
791 ng-hide="vm_cc.selectedFields.length"
793 <div class="md-toolbar-tools">
796 on-search="vm_cc.query.field = query"
797 on-collapse="vm_cc.query.field = undefined"
801 ng-if="vm_cc.crudPermissions.canEdit"
802 class="md-icon-button"
803 ng-click="vm_cc.createOrEditField($event)"
804 aria-label="add field"
806 translate-attr-label="INTEGRATIONS.ADD_FIELD"
808 <md-icon md-font-icon="icon-plus"></md-icon>
813 class="md-table-toolbar md-accent"
814 ng-show="vm_cc.selectedFields.length"
816 <div class="md-toolbar-tools">
817 <span class="md-subhead"
818 >{{vm_cc.selectedFields.length}}
819 {{vm_cc.selectedFields.length > 1 ? 'items' :
820 'item'}} selected</span
824 ng-if="vm_cc.crudPermissions.canDelete"
825 class="md-icon-button"
826 ng-click="vm_cc.deleteSelectedFields($event)"
827 aria-label="delete selected"
829 translate-attr-label="INTEGRATIONS.DELETE_SELECTED"
831 <md-icon md-font-icon="icon-delete"></md-icon>
836 class="md-whiteframe-1dp padding-horizontal"
842 ng-model="vm_cc.selectedFields"
847 {{ 'INTEGRATIONS.ID' | translate }}
850 {{ 'INTEGRATIONS.TYPE' | translate }}
853 {{ 'INTEGRATIONS.CONTENT' | translate }}
855 <th md-column width="10px"></th>
863 ng-repeat="field in vm_cc.fields | filter: vm_cc.query.field"
866 ng-click="vm_cc.createOrEditField($event, field)"
873 ng-click="vm_cc.createOrEditField($event, field)"
877 <span ng-if="field.FieldId"
878 >{{field.nameField || field.idField}}</span
880 <span ng-if="!field.FieldId"
881 >{{field.type}}</span
885 ng-switch="field.type"
886 ng-click="vm_cc.createOrEditField($event, field)"
889 <span ng-switch-when="string"
890 >{{field.content}}</span
893 ng-switch-when="variable"
895 >{{field.variableName}}</span
898 ng-switch-when="customVariable"
900 >{{ vm_cc.variablesById[field.VariableId].name
903 <span ng-switch-when="keyValue">
905 <span ng-switch="description.keyType">
906 <span ng-switch-when="string"
907 >{{field.keyContent}}</span
910 ng-switch-when="variable"
912 >{{field.variableName}}</span
915 ng-switch-when="customVariable"
918 vm_cc.variablesById[field.VariableId].name
923 <span ng-switch-default>{{field.content}}</span>
928 ng-if="!vm_cc.crudPermissions.readOnly"
932 class="md-icon-button"
935 translate-attr-aria-label="INTEGRATIONS.MORE"
936 ng-click="$mdOpenMenu($event)"
939 md-font-icon="icon-dots-vertical"
943 <md-menu-content width="3">
945 ng-if="vm_cc.crudPermissions.canEdit"
948 ng-click="vm_cc.createOrEditField($event, field)"
949 translate="INTEGRATIONS.EDIT_FIELD"
955 ng-if="vm_cc.crudPermissions.canDelete"
958 ng-click="vm_cc.deleteFieldConfirm($event, field)"
959 translate="INTEGRATIONS.DELETE_FIELD"
970 </md-table-container>
976 <span translate="INTEGRATIONS.TAGS">TAGS</span>
979 <md-table-container class="md-whiteframe-1dp padding-20">
980 <md-input-container class="md-block">
981 <label translate="INTEGRATIONS.TAGS">Tags</label>
983 ng-model="vm_cc.selectedTags"
984 ng-change="vm_cc.selectTagsChanged($event)"
989 ng-repeat="tag in vm_cc.tags"
990 >{{ tag.name }}</md-option
993 </md-input-container>
994 </md-table-container>
1000 ng-if="!vm_cc.zendeskConfigurations.length && vm_cc.crudPermissions.canEdit"
1001 ng-click="vm_cc.createOrEditZendeskConfiguration($event)"
1004 layout-align="center center"
1008 class="padding-20 md-whiteframe-3dp md-accent-bg"
1010 layout-align="center center"
1012 <md-button class="md-icon-button">
1013 <md-icon md-font-icon="icon-plus"></md-icon>
1016 aria-label="add configuration"
1018 translate-attr-label="INTEGRATIONS.ADD_CONFIGURATION"
1019 >ADD CONFIGURATION</span