2 id="integrations-zohoAccount"
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-zohoAccounts-button md-icon-button"
11 aria-label="Go to zohoAccounts"
12 ng-click="vm.gotoZohoAccounts()"
14 translate-attr-aria-label="INTEGRATIONS.GO_TO_ZOHOACCOUNTS"
16 <md-icon md-font-icon="icon-arrow-left"></md-icon>
19 <div layout="row" layout-align="start center">
20 <div class="zohoAccount-image" hide-xs>
21 <img ng-src="assets/images/business/zohoAccounts.jpg" />
24 <div layout="column" layout-align="start start">
26 #{{vm.zohoAccount.id}}
27 <span ng-if="vm.zohoAccount.name">{{vm.zohoAccount.name}}</span>
29 <div class="subtitle secondary-text">
30 <span translate="INTEGRATIONS.CREATED_AT"></span>
31 <span>{{vm.zohoAccount.createdAt | date:'medium'}}</span>
39 ng-click="vm.saveZohoAccount()"
40 ng-if="vm.crudPermissions.canEdit"
41 class="send-button md-accent md-raised"
42 ng-disabled="(generalForm.$invalid) || (configurationsForm.$invalid)"
43 translate="INTEGRATIONS.SAVE"
44 translate-attr-aria-label="INTEGRATIONS.SAVE"
55 md-selected="vm.selectedTab"
56 md-stretch-tabs="always"
63 <span translate="INTEGRATIONS.ACCOUNT">ACCOUNT</span>
67 class="zohoAccount-detail-form-container general md-background-bg md-whiteframe-1dp"
69 <div class="pb-16" layout="row" layout-align="start center">
70 <div class="h2 secondary-text" translate="INTEGRATIONS.GENERAL">
74 <form name="generalForm" novalidate>
75 <md-input-container class="md-block">
76 <label translate="INTEGRATIONS.NAME">Name</label>
80 ng-model="vm.zohoAccount.name"
83 ng-disabled="!vm.crudPermissions.canEdit"
87 ng-messages="generalForm['name'].$error"
88 ng-show="generalForm['name'].$touched"
91 <div ng-message="required">
92 <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED"
93 >Name field is required</span
98 <md-input-container class="md-block">
99 <label translate="INTEGRATIONS.HOST">Host</label>
102 ng-model="vm.zohoAccount.host"
104 ng-disabled="!vm.crudPermissions.canEdit"
106 <md-option ng-value="'zoho.com'">zoho.com</md-option>
107 <md-option ng-value="'zoho.eu'">zoho.eu</md-option>
110 ng-messages="generalForm['host'].$error"
111 ng-show="generalForm['host'].$touched"
114 <div ng-message="required">
115 <span translate="INTEGRATIONS.ERRORS.HOST_REQUIRED"
116 >Host field is required</span
120 </md-input-container>
121 <md-input-container class="md-block">
122 <label translate="INTEGRATIONS.ZONE">Zone</label>
125 ng-model="vm.zohoAccount.zone"
127 ng-disabled="!vm.crudPermissions.canEdit"
129 <md-option ng-value="'US'">US</md-option>
130 <md-option ng-value="'AU'">AU</md-option>
131 <md-option ng-value="'EU'">EU</md-option>
132 <md-option ng-value="'IN'">IN</md-option>
133 <md-option ng-value="'CN'">CN</md-option>
136 <span translate="INTEGRATIONS.HELP.ZONE"></span>
139 ng-messages="generalForm['zone'].$error"
140 ng-show="generalForm['zone'].$touched"
143 <div ng-message="required">
144 <span translate="INTEGRATIONS.ERRORS.ZONE_REQUIRED"
145 >Zone field is required</span
149 </md-input-container>
150 <md-input-container class="md-block">
151 <label translate="INTEGRATIONS.CLIENTID">ClientId</label>
155 ng-model="vm.zohoAccount.clientId"
157 ng-disabled="!vm.crudPermissions.canEdit"
161 <span translate="INTEGRATIONS.HELP.CLIENTID"></span>
164 ng-messages="generalForm['clientId'].$error"
165 ng-show="generalForm['clientId'].$touched"
168 <div ng-message="required">
169 <span translate="INTEGRATIONS.ERRORS.CLIENTID_REQUIRED"
170 >ClientId field is required</span
174 </md-input-container>
175 <md-input-container class="md-block">
176 <label translate="INTEGRATIONS.CLIENTSECRET"
182 ng-model="vm.zohoAccount.clientSecret"
184 ng-disabled="!vm.crudPermissions.canEdit"
188 <span translate="INTEGRATIONS.HELP.CLIENTSECRET"></span>
191 ng-messages="generalForm['clientSecret'].$error"
192 ng-show="generalForm['clientSecret'].$touched"
195 <div ng-message="required">
196 <span translate="INTEGRATIONS.ERRORS.CLIENTSECRET_REQUIRED"
197 >ClientSecret field is required</span
201 </md-input-container>
202 <md-input-container class="md-block">
203 <label translate="INTEGRATIONS.CODE">Code</label>
207 ng-model="vm.zohoAccount.code"
209 ng-disabled="!vm.crudPermissions.canEdit"
213 <span translate="INTEGRATIONS.HELP.CODE"></span>
216 ng-messages="generalForm['code'].$error"
217 ng-show="generalForm['code'].$touched"
220 <div ng-message="required">
221 <span translate="INTEGRATIONS.ERRORS.CODE_REQUIRED"
222 >Code field is required</span
226 </md-input-container>
227 <md-input-container class="md-block">
228 <label translate="INTEGRATIONS.REFRESHTOKEN"
234 ng-model="vm.zohoAccount.refreshToken"
239 <span translate="INTEGRATIONS.HELP.REFRESHTOKEN"></span>
242 ng-messages="generalForm['refreshToken'].$error"
243 ng-show="generalForm['refreshToken'].$touched"
246 <div ng-message="required">
247 <span translate="INTEGRATIONS.ERRORS.REFRESHTOKEN_REQUIRED"
248 >RefreshToken field is required</span
252 </md-input-container>
253 <md-input-container class="md-block">
254 <label translate="INTEGRATIONS.MOTIONPROXYADDRESS"
255 >MotionProxyAddress</label
260 ng-model="vm.zohoAccount.serverUrl"
261 ng-disabled="!vm.crudPermissions.canEdit"
265 <span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span>
268 ng-messages="generalForm['serverUrl'].$error"
269 ng-show="generalForm['serverUrl'].$touched"
272 <div ng-message="required">
274 translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED"
275 >MotionProxyAddress field is required</span
278 <div ng-message="url">
280 translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL"
281 >MotionProxyAddress must be a valid url
282 http://www.xcally.com</span
286 </md-input-container>
287 <md-input-container class="md-block">
288 <label translate="INTEGRATIONS.DESCRIPTION">Description</label>
292 ng-model="vm.zohoAccount.description"
293 ng-disabled="!vm.crudPermissions.canEdit"
297 ng-messages="generalForm['description'].$error"
298 ng-show="generalForm['description'].$touched"
301 <div ng-message="required">
302 <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED"
303 >Description field is required</span
307 </md-input-container>
314 <span translate="INTEGRATIONS.CONFIGURATIONS">CONFIGURATIONS</span>
318 class="zohoAccount-detail-form-container configurations md-background-bg md-whiteframe-1dp"
320 <div class="pb-16" layout="row" layout-align="start center">
322 class="h2 secondary-text"
323 translate="INTEGRATIONS.CONFIGURATIONS"
329 ng-controller="ZohoAccountConfigurationsController as vm_cc"
330 ng-init="vm_cc.init(vm.zohoAccount, vm.crudPermissions)"
333 <md-card class="md-whiteframe-1dp" flex="30">
334 <div layout="row" layout-align="center center">
335 <md-subheader flex="75" class="md-no-sticky"
336 >{{ 'INTEGRATIONS.CONFIGURATIONS' | translate
341 ng-if="vm_cc.crudPermissions.canEdit"
342 ng-click="vm_cc.createOrEditZohoConfiguration($event)"
343 class="md-icon-button"
344 aria-label="create zohoConfiguration"
346 <md-icon md-font-icon="icon-plus"></md-icon>
352 layout-align="center center"
353 ng-repeat="zohoConfiguration in vm_cc.configurations"
355 md-colors="{background: (vm_cc.selectedZohoConfiguration == $index ? 'accent' : 'grey-A100')}"
356 ng-click="vm_cc.getZohoConfiguration($index)"
358 <span class="text-truncate" flex="80"
359 >{{ zohoConfiguration.name }}</span
361 <md-menu ng-if="vm_cc.crudPermissions.canDelete">
363 class="md-icon-button"
366 translate-attr-aria-label="INTEGRATIONS.MORE"
367 ng-click="$mdOpenMenu($event)"
369 <md-icon md-font-icon="icon-dots-vertical"></md-icon>
371 <md-menu-content width="3">
372 <md-menu-item ng-if="vm_cc.crudPermissions.canDelete">
374 ng-click="vm_cc.deleteZohoConfiguration($event, zohoConfiguration)"
375 translate="INTEGRATIONS.DELETE_ZOHOCONFIGURATION"
377 Delete ZohoConfiguration
386 <md-card class="md-whiteframe-1dp" flex="65">
387 <md-tabs ng-if="vm_cc.configurations.length" md-dynamic-height>
390 <span translate="INTEGRATIONS.SUBJECTS">SUBJECTS</span>
394 class="md-table-toolbar md-default no-padding"
395 ng-hide="vm_cc.selectedSubjects.length"
397 <div class="md-toolbar-tools">
400 on-search="vm_cc.query.subject = query"
401 on-collapse="vm_cc.query.subject = undefined"
405 ng-if="vm_cc.crudPermissions.canEdit"
406 class="md-icon-button"
407 ng-click="vm_cc.createOrEditSubject($event)"
408 aria-label="add subject"
410 translate-attr-label="INTEGRATIONS.ADD_SUBJECT"
412 <md-icon md-font-icon="icon-plus"></md-icon>
417 class="md-table-toolbar md-accent"
418 ng-show="vm_cc.selectedSubjects.length"
420 <div class="md-toolbar-tools">
421 <span class="md-subhead"
422 >{{vm_cc.selectedSubjects.length}}
423 {{vm_cc.selectedSubjects.length > 1 ? 'items' :
424 'item'}} selected</span
428 ng-if="vm_cc.crudPermissions.canDelete"
429 class="md-icon-button"
430 ng-click="vm_cc.deleteSelectedSubjects($event)"
431 aria-label="delete selected"
433 translate-attr-label="INTEGRATIONS.DELETE_SELECTED"
435 <md-icon md-font-icon="icon-delete"></md-icon>
440 class="md-whiteframe-1dp padding-horizontal"
446 ng-model="vm_cc.selectedSubjects"
451 {{ 'INTEGRATIONS.ID' | translate }}
454 {{ 'INTEGRATIONS.TYPE' | translate }}
457 {{ 'INTEGRATIONS.CONTENT' | translate }}
459 <th md-column width="10px"></th>
467 ng-repeat="subject in vm_cc.subjects | filter: vm_cc.query.subject"
470 ng-click="vm_cc.createOrEditSubject($event, subject)"
477 ng-click="vm_cc.createOrEditSubject($event, subject)"
481 <span ng-if="subject.FieldId"
482 >{{subject.nameField ||
483 subject.idField}}</span
485 <span ng-if="!subject.FieldId"
486 >{{subject.type}}</span
490 ng-switch="subject.type"
491 ng-click="vm_cc.createOrEditSubject($event, subject)"
494 <span ng-switch-when="string"
495 >{{subject.content}}</span
498 ng-switch-when="variable"
500 >{{subject.variableName}}</span
503 ng-switch-when="customVariable"
506 vm_cc.variablesById[subject.VariableId].name
509 <span ng-switch-when="keyValue">
511 <span ng-switch="description.keyType">
512 <span ng-switch-when="string"
513 >{{subject.keyContent}}</span
516 ng-switch-when="variable"
518 >{{subject.variableName}}</span
521 ng-switch-when="customVariable"
524 vm_cc.variablesById[subject.VariableId].name
529 <span ng-switch-default
530 >{{subject.content}}</span
536 ng-if="!vm_cc.crudPermissions.readOnly"
540 class="md-icon-button"
543 translate-attr-aria-label="INTEGRATIONS.MORE"
544 ng-click="$mdOpenMenu($event)"
547 md-font-icon="icon-dots-vertical"
551 <md-menu-content width="3">
553 ng-if="vm_cc.crudPermissions.canEdit"
556 ng-click="vm_cc.createOrEditSubject($event, subject)"
557 translate="INTEGRATIONS.EDIT_SUBJECT"
563 ng-if="vm_cc.crudPermissions.canDelete"
566 ng-click="vm_cc.deleteSubjectConfirm($event, subject)"
567 translate="INTEGRATIONS.DELETE_SUBJECT"
578 </md-table-container>
584 <span translate="INTEGRATIONS.DESCRIPTIONS"
590 class="md-table-toolbar md-default no-padding"
591 ng-hide="vm_cc.selectedDescriptions.length"
593 <div class="md-toolbar-tools">
596 on-search="vm_cc.query.description = query"
597 on-collapse="vm_cc.query.description = undefined"
601 ng-if="vm_cc.crudPermissions.canEdit"
602 class="md-icon-button"
603 ng-click="vm_cc.createOrEditDescription($event)"
604 aria-label="add description"
606 translate-attr-label="INTEGRATIONS.ADD_DESCRIPTION"
608 <md-icon md-font-icon="icon-plus"></md-icon>
613 class="md-table-toolbar md-accent"
614 ng-show="vm_cc.selectedDescriptions.length"
616 <div class="md-toolbar-tools">
617 <span class="md-subhead"
618 >{{vm_cc.selectedDescriptions.length}}
619 {{vm_cc.selectedDescriptions.length > 1 ? 'items' :
620 'item'}} selected</span
624 ng-if="vm_cc.crudPermissions.canDelete"
625 class="md-icon-button"
626 ng-click="vm_cc.deleteSelectedDescriptions($event)"
627 aria-label="delete selected"
629 translate-attr-label="INTEGRATIONS.DELETE_SELECTED"
631 <md-icon md-font-icon="icon-delete"></md-icon>
636 class="md-whiteframe-1dp padding-horizontal"
642 ng-model="vm_cc.selectedDescriptions"
647 {{ 'INTEGRATIONS.ID' | translate }}
650 {{ 'INTEGRATIONS.TYPE' | translate }}
653 {{ 'INTEGRATIONS.CONTENT' | translate }}
655 <th md-column width="10px"></th>
661 md-select="description"
663 ng-repeat="description in vm_cc.descriptions | filter: vm_cc.query.description"
666 ng-click="vm_cc.createOrEditDescription($event, description)"
673 ng-click="vm_cc.createOrEditDescription($event, description)"
677 <span ng-if="description.FieldId"
678 >{{description.nameField ||
679 description.idField}}</span
681 <span ng-if="!description.FieldId"
682 >{{description.type}}</span
686 ng-switch="description.type"
687 ng-click="vm_cc.createOrEditDescription($event, description)"
690 <span ng-switch-when="string"
691 >{{description.content}}</span
694 ng-switch-when="variable"
696 >{{description.variableName}}</span
699 ng-switch-when="customVariable"
702 vm_cc.variablesById[description.VariableId].name
705 <span ng-switch-when="keyValue">
707 <span ng-switch="description.keyType">
708 <span ng-switch-when="string"
709 >{{description.keyContent}}</span
712 ng-switch-when="variable"
714 >{{description.variableName}}</span
717 ng-switch-when="customVariable"
720 vm_cc.variablesById[description.VariableId].name
725 <span ng-switch-default
726 >{{description.content}}</span
732 ng-if="!vm_cc.crudPermissions.readOnly"
736 class="md-icon-button"
739 translate-attr-aria-label="INTEGRATIONS.MORE"
740 ng-click="$mdOpenMenu($event)"
743 md-font-icon="icon-dots-vertical"
747 <md-menu-content width="3">
749 ng-if="vm_cc.crudPermissions.canEdit"
752 ng-click="vm_cc.createOrEditDescription($event, description)"
753 translate="INTEGRATIONS.EDIT_DESCRIPTION"
759 ng-if="vm_cc.crudPermissions.canDelete"
762 ng-click="vm_cc.deleteDescriptionConfirm($event, description)"
763 translate="INTEGRATIONS.DELETE_DESCRIPTION"
774 </md-table-container>
780 <span translate="INTEGRATIONS.FIELDS">FIELDS</span>
784 class="md-table-toolbar md-default no-padding"
785 ng-hide="vm_cc.selectedFields.length"
787 <div class="md-toolbar-tools">
790 on-search="vm_cc.query.field = query"
791 on-collapse="vm_cc.query.field = undefined"
795 ng-if="vm_cc.crudPermissions.canEdit"
796 class="md-icon-button"
797 ng-click="vm_cc.createOrEditField($event)"
798 aria-label="add field"
800 translate-attr-label="INTEGRATIONS.ADD_FIELD"
802 <md-icon md-font-icon="icon-plus"></md-icon>
807 class="md-table-toolbar md-accent"
808 ng-show="vm_cc.selectedFields.length"
810 <div class="md-toolbar-tools">
811 <span class="md-subhead"
812 >{{vm_cc.selectedFields.length}}
813 {{vm_cc.selectedFields.length > 1 ? 'items' :
814 'item'}} selected</span
818 ng-if="vm_cc.crudPermissions.canDelete"
819 class="md-icon-button"
820 ng-click="vm_cc.deleteSelectedFields($event)"
821 aria-label="delete selected"
823 translate-attr-label="INTEGRATIONS.DELETE_SELECTED"
825 <md-icon md-font-icon="icon-delete"></md-icon>
830 class="md-whiteframe-1dp padding-horizontal"
836 ng-model="vm_cc.selectedFields"
841 {{ 'INTEGRATIONS.ID' | translate }}
844 {{ 'INTEGRATIONS.TYPE' | translate }}
847 {{ 'INTEGRATIONS.CONTENT' | translate }}
849 <th md-column width="10px"></th>
857 ng-repeat="field in vm_cc.fields | filter: vm_cc.query.field"
860 ng-click="vm_cc.createOrEditField($event, field)"
867 ng-click="vm_cc.createOrEditField($event, field)"
871 <span ng-if="field.FieldId"
872 >{{field.nameField || field.idField}}</span
874 <span ng-if="!field.FieldId"
875 >{{field.type}}</span
879 ng-switch="field.type"
880 ng-click="vm_cc.createOrEditField($event, field)"
883 <span ng-switch-when="string"
884 >{{field.content}}</span
887 ng-switch-when="variable"
889 >{{field.variableName}}</span
892 ng-switch-when="customVariable"
894 >{{ vm_cc.variablesById[field.VariableId].name
897 <span ng-switch-when="keyValue">
899 <span ng-switch="description.keyType">
900 <span ng-switch-when="string"
901 >{{field.keyContent}}</span
904 ng-switch-when="variable"
906 >{{field.variableName}}</span
909 ng-switch-when="customVariable"
912 vm_cc.variablesById[field.VariableId].name
917 <span ng-switch-default>{{field.content}}</span>
922 ng-if="!vm_cc.crudPermissions.readOnly"
926 class="md-icon-button"
929 translate-attr-aria-label="INTEGRATIONS.MORE"
930 ng-click="$mdOpenMenu($event)"
933 md-font-icon="icon-dots-vertical"
937 <md-menu-content width="3">
939 ng-if="vm_cc.crudPermissions.canEdit"
942 ng-click="vm_cc.createOrEditField($event, field)"
943 translate="INTEGRATIONS.EDIT_FIELD"
949 ng-if="vm_cc.crudPermissions.canDelete"
952 ng-click="vm_cc.deleteFieldConfirm($event, field)"
953 translate="INTEGRATIONS.DELETE_FIELD"
964 </md-table-container>
970 <span translate="INTEGRATIONS.ADVANCED">ADVANCED</span>
974 <label translate="INTEGRATIONS.MODULE_SEARCH"></label>
976 ng-model="vm_cc.zohoConfiguration.moduleSearch"
977 ng-change="vm_cc.selectChangedAdvanced()"
978 ng-disabled="!vm_cc.crudPermissions.canEdit"
981 ng-value="option.key"
982 ng-repeat="option in [{key: 'contact_lead', value: 'Contact & Lead'}, {key: 'contact', value: 'Contact'}, {key: 'lead', value: 'Lead'}]"
983 >{{ option.value }}</md-option
988 <label translate="INTEGRATIONS.MODULE_CREATE"></label>
990 ng-model="vm_cc.zohoConfiguration.moduleCreate"
991 ng-change="vm_cc.selectChangedAdvanced()"
992 ng-disabled="!vm_cc.crudPermissions.canEdit"
995 ng-value="option.key"
996 ng-repeat="option in [{key: 'nothing', value: 'Nothing'}, {key: 'contact', value: 'Contact'}, {key: 'lead', value: 'Lead'}]"
997 >{{ option.value }}</md-option
1006 ng-if="!vm_cc.configurations.length && vm_cc.crudPermissions.canEdit"
1007 ng-click="vm_cc.createOrEditZohoConfiguration($event)"
1010 layout-align="center center"
1014 class="padding-20 md-whiteframe-3dp md-accent-bg"
1016 layout-align="center center"
1018 <md-button class="md-icon-button">
1019 <md-icon md-font-icon="icon-plus"></md-icon>
1022 aria-label="add configuration"
1024 translate-attr-label="INTEGRATIONS.ADD_CONFIGURATION"
1025 >ADD CONFIGURATION</span