2 id="integrations-freshdeskAccount"
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-freshdeskAccounts-button md-icon-button"
11 aria-label="Go to freshdeskAccounts"
12 ng-click="vm.gotoFreshdeskAccounts()"
14 translate-attr-aria-label="INTEGRATIONS.GO_TO_FRESHDESKACCOUNTS"
16 <md-icon md-font-icon="icon-arrow-left"></md-icon>
19 <div layout="row" layout-align="start center">
20 <div class="freshdeskAccount-image" hide-xs>
21 <img ng-src="assets/images/business/freshdeskAccounts.jpg" />
24 <div layout="column" layout-align="start start">
26 #{{vm.freshdeskAccount.id}}
27 <span ng-if="vm.freshdeskAccount.name"
28 >{{vm.freshdeskAccount.name}}</span
31 <div class="subtitle secondary-text">
32 <span translate="INTEGRATIONS.CREATED_AT"></span>
33 <span>{{vm.freshdeskAccount.createdAt | date:'medium'}}</span>
41 ng-click="vm.saveFreshdeskAccount()"
42 ng-if="vm.crudPermissions.canEdit"
43 class="send-button md-accent md-raised"
44 ng-disabled="(generalForm.$invalid) || (configurationsForm.$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="freshdeskAccount-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.freshdeskAccount.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.USERNAME">Username</label>
105 ng-model="vm.freshdeskAccount.username"
107 ng-disabled="!vm.crudPermissions.canEdit"
111 ng-messages="generalForm['username'].$error"
112 ng-show="generalForm['username'].$touched"
115 <div ng-message="required">
116 <span translate="INTEGRATIONS.ERRORS.USERNAME_REQUIRED"
117 >Username field is required</span
121 </md-input-container>
122 <md-input-container class="md-block">
123 <label translate="INTEGRATIONS.URI">Uri</label>
127 ng-model="vm.freshdeskAccount.remoteUri"
129 ng-disabled="!vm.crudPermissions.canEdit"
133 ng-messages="generalForm['remoteUri'].$error"
134 ng-show="generalForm['remoteUri'].$touched"
137 <div ng-message="required">
138 <span translate="INTEGRATIONS.ERRORS.URI_REQUIRED"
139 >Uri field is required</span
142 <div ng-message="url">
143 <span translate="INTEGRATIONS.ERRORS.URI_MUST_VALID_URL"
144 >Uri must be a valid url http://www.xcally.com</span
148 </md-input-container>
149 <md-input-container class="md-block">
150 <label translate="INTEGRATIONS.APIKEY">ApiKey</label>
154 ng-model="vm.freshdeskAccount.apiKey"
156 ng-disabled="!vm.crudPermissions.canEdit"
160 ng-messages="generalForm['apiKey'].$error"
161 ng-show="generalForm['apiKey'].$touched"
164 <div ng-message="required">
165 <span translate="INTEGRATIONS.ERRORS.APIKEY_REQUIRED"
166 >ApiKey field is required</span
170 </md-input-container>
171 <md-input-container class="md-block">
172 <label translate="INTEGRATIONS.MOTIONPROXYADDRESS"
173 >MotionProxyAddress</label
178 ng-model="vm.freshdeskAccount.serverUrl"
179 ng-disabled="!vm.crudPermissions.canEdit"
183 <span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span>
186 ng-messages="generalForm['serverUrl'].$error"
187 ng-show="generalForm['serverUrl'].$touched"
190 <div ng-message="required">
192 translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED"
193 >MotionProxyAddress field is required</span
196 <div ng-message="url">
198 translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL"
199 >MotionProxyAddress must be a valid url
200 http://www.xcally.com</span
204 </md-input-container>
205 <md-input-container class="md-block">
206 <label translate="INTEGRATIONS.DESCRIPTION">Description</label>
210 ng-model="vm.freshdeskAccount.description"
211 ng-disabled="!vm.crudPermissions.canEdit"
215 ng-messages="generalForm['description'].$error"
216 ng-show="generalForm['description'].$touched"
219 <div ng-message="required">
220 <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED"
221 >Description field is required</span
225 </md-input-container>
232 <span translate="INTEGRATIONS.CONFIGURATIONS">CONFIGURATIONS</span>
236 class="freshdeskAccount-detail-form-container configurations md-background-bg md-whiteframe-1dp"
238 <div class="pb-16" layout="row" layout-align="start center">
240 class="h2 secondary-text"
241 translate="INTEGRATIONS.CONFIGURATIONS"
247 ng-controller="FreshdeskAccountConfigurationsController as vm_cc"
248 ng-init="vm_cc.init(vm.freshdeskAccount, vm.crudPermissions)"
251 <md-card class="md-whiteframe-1dp" flex="30">
252 <div layout="row" layout-align="center center">
253 <md-subheader flex="75" class="md-no-sticky"
254 >{{ 'INTEGRATIONS.CONFIGURATIONS' | translate
259 ng-if="vm_cc.crudPermissions.canEdit"
260 ng-click="vm_cc.createOrEditFreshdeskConfiguration($event)"
261 class="md-icon-button"
262 aria-label="create freshdeskConfiguration"
264 <md-icon md-font-icon="icon-plus"></md-icon>
270 layout-align="center center"
271 ng-repeat="freshdeskConfiguration in vm_cc.configurations"
273 md-colors="{background: (vm_cc.selectedFreshdeskConfiguration == $index ? 'accent' : 'grey-A100')}"
274 ng-click="vm_cc.getFreshdeskConfiguration($index)"
276 <span class="text-truncate" flex="80"
277 >{{ freshdeskConfiguration.name }}</span
279 <md-menu ng-if="vm_cc.crudPermissions.canDelete">
281 class="md-icon-button"
284 translate-attr-aria-label="INTEGRATIONS.MORE"
285 ng-click="$mdOpenMenu($event)"
287 <md-icon md-font-icon="icon-dots-vertical"></md-icon>
289 <md-menu-content width="3">
290 <md-menu-item ng-if="vm_cc.crudPermissions.canDelete">
292 ng-click="vm_cc.deleteFreshdeskConfiguration($event, freshdeskConfiguration)"
293 translate="INTEGRATIONS.DELETE_FRESHDESKCONFIGURATION"
295 Delete FreshdeskConfiguration
304 <md-card class="md-whiteframe-1dp" flex="65">
305 <md-tabs ng-if="vm_cc.configurations.length" md-dynamic-height>
308 <span translate="INTEGRATIONS.SUBJECTS">SUBJECTS</span>
312 class="md-table-toolbar md-default no-padding"
313 ng-hide="vm_cc.selectedSubjects.length"
315 <div class="md-toolbar-tools">
318 on-search="vm_cc.query.subject = query"
319 on-collapse="vm_cc.query.subject = undefined"
323 ng-if="vm_cc.crudPermissions.canEdit"
324 class="md-icon-button"
325 ng-click="vm_cc.createOrEditSubject($event)"
326 aria-label="add subject"
328 translate-attr-label="INTEGRATIONS.ADD_SUBJECT"
330 <md-icon md-font-icon="icon-plus"></md-icon>
335 class="md-table-toolbar md-accent"
336 ng-show="vm_cc.selectedSubjects.length"
338 <div class="md-toolbar-tools">
339 <span class="md-subhead"
340 >{{vm_cc.selectedSubjects.length}}
341 {{vm_cc.selectedSubjects.length > 1 ? 'items' :
342 'item'}} selected</span
346 ng-if="vm_cc.crudPermissions.canDelete"
347 class="md-icon-button"
348 ng-click="vm_cc.deleteSelectedSubjects($event)"
349 aria-label="delete selected"
351 translate-attr-label="INTEGRATIONS.DELETE_SELECTED"
353 <md-icon md-font-icon="icon-delete"></md-icon>
358 class="md-whiteframe-1dp padding-horizontal"
364 ng-model="vm_cc.selectedSubjects"
369 {{ 'INTEGRATIONS.ID' | translate }}
372 {{ 'INTEGRATIONS.TYPE' | translate }}
375 {{ 'INTEGRATIONS.CONTENT' | translate }}
377 <th md-column width="10px"></th>
385 ng-repeat="subject in vm_cc.subjects | filter: vm_cc.query.subject"
388 ng-click="vm_cc.createOrEditSubject($event, subject)"
395 ng-click="vm_cc.createOrEditSubject($event, subject)"
399 <span ng-if="subject.FieldId"
400 >{{subject.nameField ||
401 subject.idField}}</span
403 <span ng-if="!subject.FieldId"
404 >{{subject.type}}</span
408 ng-switch="subject.type"
409 ng-click="vm_cc.createOrEditSubject($event, subject)"
412 <span ng-switch-when="string"
413 >{{subject.content}}</span
416 ng-switch-when="variable"
418 >{{subject.variableName}}</span
421 ng-switch-when="customVariable"
424 vm_cc.variablesById[subject.VariableId].name
427 <span ng-switch-when="keyValue">
429 <span ng-switch="description.keyType">
430 <span ng-switch-when="string"
431 >{{subject.keyContent}}</span
434 ng-switch-when="variable"
436 >{{subject.variableName}}</span
439 ng-switch-when="customVariable"
442 vm_cc.variablesById[subject.VariableId].name
447 <span ng-switch-default
448 >{{subject.content}}</span
454 ng-if="!vm_cc.crudPermissions.readOnly"
458 class="md-icon-button"
461 translate-attr-aria-label="INTEGRATIONS.MORE"
462 ng-click="$mdOpenMenu($event)"
465 md-font-icon="icon-dots-vertical"
469 <md-menu-content width="3">
471 ng-if="vm_cc.crudPermissions.canEdit"
474 ng-click="vm_cc.createOrEditSubject($event, subject)"
475 translate="INTEGRATIONS.EDIT_SUBJECT"
481 ng-if="vm_cc.crudPermissions.canDelete"
484 ng-click="vm_cc.deleteSubjectConfirm($event, subject)"
485 translate="INTEGRATIONS.DELETE_SUBJECT"
496 </md-table-container>
502 <span translate="INTEGRATIONS.DESCRIPTIONS"
508 class="md-table-toolbar md-default no-padding"
509 ng-hide="vm_cc.selectedDescriptions.length"
511 <div class="md-toolbar-tools">
514 on-search="vm_cc.query.description = query"
515 on-collapse="vm_cc.query.description = undefined"
519 ng-if="vm_cc.crudPermissions.canEdit"
520 class="md-icon-button"
521 ng-click="vm_cc.createOrEditDescription($event)"
522 aria-label="add description"
524 translate-attr-label="INTEGRATIONS.ADD_DESCRIPTION"
526 <md-icon md-font-icon="icon-plus"></md-icon>
531 class="md-table-toolbar md-accent"
532 ng-show="vm_cc.selectedDescriptions.length"
534 <div class="md-toolbar-tools">
535 <span class="md-subhead"
536 >{{vm_cc.selectedDescriptions.length}}
537 {{vm_cc.selectedDescriptions.length > 1 ? 'items' :
538 'item'}} selected</span
542 ng-if="vm_cc.crudPermissions.canDelete"
543 class="md-icon-button"
544 ng-click="vm_cc.deleteSelectedDescriptions($event)"
545 aria-label="delete selected"
547 translate-attr-label="INTEGRATIONS.DELETE_SELECTED"
549 <md-icon md-font-icon="icon-delete"></md-icon>
554 class="md-whiteframe-1dp padding-horizontal"
560 ng-model="vm_cc.selectedDescriptions"
565 {{ 'INTEGRATIONS.ID' | translate }}
568 {{ 'INTEGRATIONS.TYPE' | translate }}
571 {{ 'INTEGRATIONS.CONTENT' | translate }}
573 <th md-column width="10px"></th>
579 md-select="description"
581 ng-repeat="description in vm_cc.descriptions | filter: vm_cc.query.description"
584 ng-click="vm_cc.createOrEditDescription($event, description)"
591 ng-click="vm_cc.createOrEditDescription($event, description)"
595 <span ng-if="description.FieldId"
596 >{{description.nameField ||
597 description.idField}}</span
599 <span ng-if="!description.FieldId"
600 >{{description.type}}</span
604 ng-switch="description.type"
605 ng-click="vm_cc.createOrEditDescription($event, description)"
608 <span ng-switch-when="string"
609 >{{description.content}}</span
612 ng-switch-when="variable"
614 >{{description.variableName}}</span
617 ng-switch-when="customVariable"
620 vm_cc.variablesById[description.VariableId].name
623 <span ng-switch-when="keyValue">
625 <span ng-switch="description.keyType">
626 <span ng-switch-when="string"
627 >{{description.keyContent}}</span
630 ng-switch-when="variable"
632 >{{description.variableName}}</span
635 ng-switch-when="customVariable"
638 vm_cc.variablesById[description.VariableId].name
643 <span ng-switch-default
644 >{{description.content}}</span
650 ng-if="!vm_cc.crudPermissions.readOnly"
654 class="md-icon-button"
657 translate-attr-aria-label="INTEGRATIONS.MORE"
658 ng-click="$mdOpenMenu($event)"
661 md-font-icon="icon-dots-vertical"
665 <md-menu-content width="3">
667 ng-if="vm_cc.crudPermissions.canEdit"
670 ng-click="vm_cc.createOrEditDescription($event, description)"
671 translate="INTEGRATIONS.EDIT_DESCRIPTION"
677 ng-if="vm_cc.crudPermissions.canDelete"
680 ng-click="vm_cc.deleteDescriptionConfirm($event, description)"
681 translate="INTEGRATIONS.DELETE_DESCRIPTION"
692 </md-table-container>
698 <span translate="INTEGRATIONS.FIELDS">FIELDS</span>
702 class="md-table-toolbar md-default no-padding"
703 ng-hide="vm_cc.selectedFields.length"
705 <div class="md-toolbar-tools">
708 on-search="vm_cc.query.field = query"
709 on-collapse="vm_cc.query.field = undefined"
713 ng-if="vm_cc.crudPermissions.canEdit"
714 class="md-icon-button"
715 ng-click="vm_cc.createOrEditField($event)"
716 aria-label="add field"
718 translate-attr-label="INTEGRATIONS.ADD_FIELD"
720 <md-icon md-font-icon="icon-plus"></md-icon>
725 class="md-table-toolbar md-accent"
726 ng-show="vm_cc.selectedFields.length"
728 <div class="md-toolbar-tools">
729 <span class="md-subhead"
730 >{{vm_cc.selectedFields.length}}
731 {{vm_cc.selectedFields.length > 1 ? 'items' :
732 'item'}} selected</span
736 ng-if="vm_cc.crudPermissions.canDelete"
737 class="md-icon-button"
738 ng-click="vm_cc.deleteSelectedFields($event)"
739 aria-label="delete selected"
741 translate-attr-label="INTEGRATIONS.DELETE_SELECTED"
743 <md-icon md-font-icon="icon-delete"></md-icon>
748 class="md-whiteframe-1dp padding-horizontal"
754 ng-model="vm_cc.selectedFields"
759 {{ 'INTEGRATIONS.ID' | translate }}
762 {{ 'INTEGRATIONS.TYPE' | translate }}
765 {{ 'INTEGRATIONS.CONTENT' | translate }}
767 <th md-column width="10px"></th>
775 ng-repeat="field in vm_cc.fields | filter: vm_cc.query.field"
778 ng-click="vm_cc.createOrEditField($event, field)"
785 ng-click="vm_cc.createOrEditField($event, field)"
789 <span ng-if="field.FieldId"
790 >{{field.nameField || field.idField}}</span
792 <span ng-if="!field.FieldId"
793 >{{field.type}}</span
797 ng-switch="field.type"
798 ng-click="vm_cc.createOrEditField($event, field)"
801 <span ng-switch-when="string"
802 >{{field.content}}</span
805 ng-switch-when="variable"
807 >{{field.variableName}}</span
810 ng-switch-when="customVariable"
812 >{{ vm_cc.variablesById[field.VariableId].name
815 <span ng-switch-when="keyValue">
817 <span ng-switch="description.keyType">
818 <span ng-switch-when="string"
819 >{{field.keyContent}}</span
822 ng-switch-when="variable"
824 >{{field.variableName}}</span
827 ng-switch-when="customVariable"
830 vm_cc.variablesById[field.VariableId].name
835 <span ng-switch-default>{{field.content}}</span>
840 ng-if="!vm_cc.crudPermissions.readOnly"
844 class="md-icon-button"
847 translate-attr-aria-label="INTEGRATIONS.MORE"
848 ng-click="$mdOpenMenu($event)"
851 md-font-icon="icon-dots-vertical"
855 <md-menu-content width="3">
857 ng-if="vm_cc.crudPermissions.canEdit"
860 ng-click="vm_cc.createOrEditField($event, field)"
861 translate="INTEGRATIONS.EDIT_FIELD"
867 ng-if="vm_cc.crudPermissions.canDelete"
870 ng-click="vm_cc.deleteFieldConfirm($event, field)"
871 translate="INTEGRATIONS.DELETE_FIELD"
882 </md-table-container>
888 <span translate="INTEGRATIONS.TAGS">TAGS</span>
891 <md-table-container class="md-whiteframe-1dp padding-20">
892 <md-input-container class="md-block">
893 <label translate="INTEGRATIONS.TAGS">Tags</label>
895 ng-model="vm_cc.selectedTags"
896 ng-change="vm_cc.selectTagsChanged($event)"
901 ng-repeat="tag in vm_cc.tags"
902 >{{ tag.name }}</md-option
905 </md-input-container>
906 </md-table-container>
912 ng-if="!vm_cc.configurations.length && vm_cc.crudPermissions.canEdit"
913 ng-click="vm_cc.createOrEditFreshdeskConfiguration($event)"
916 layout-align="center center"
920 class="padding-20 md-whiteframe-3dp md-accent-bg"
922 layout-align="center center"
924 <md-button class="md-icon-button">
925 <md-icon md-font-icon="icon-plus"></md-icon>
928 aria-label="add configuration"
930 translate-attr-label="INTEGRATIONS.ADD_CONFIGURATION"
931 >ADD CONFIGURATION</span