2 id="integrations-vtigerAccount"
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-vtigerAccounts-button md-icon-button"
11 aria-label="Go to vtigerAccounts"
12 ng-click="vm.gotoVtigerAccounts()"
14 translate-attr-aria-label="INTEGRATIONS.GO_TO_VTIGERACCOUNTS"
16 <md-icon md-font-icon="icon-arrow-left"></md-icon>
19 <div layout="row" layout-align="start center">
20 <div class="vtigerAccount-image" hide-xs>
21 <img ng-src="assets/images/business/vtigerAccounts.jpg" />
24 <div layout="column" layout-align="start start">
26 #{{vm.vtigerAccount.id}}
27 <span ng-if="vm.vtigerAccount.name">{{vm.vtigerAccount.name}}</span>
29 <div class="subtitle secondary-text">
30 <span translate="INTEGRATIONS.CREATED_AT"></span>
31 <span>{{vm.vtigerAccount.createdAt | date:'medium'}}</span>
39 ng-click="vm.saveVtigerAccount()"
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="vtigerAccount-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.vtigerAccount.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.DESCRIPTION">Description</label>
103 ng-model="vm.vtigerAccount.description"
104 ng-disabled="!vm.crudPermissions.canEdit"
108 ng-messages="generalForm['description'].$error"
109 ng-show="generalForm['description'].$touched"
112 <div ng-message="required">
113 <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED"
114 >Description field is required</span
118 </md-input-container>
119 <md-input-container class="md-block">
120 <label translate="INTEGRATIONS.VTIGER_USER_NAME"
121 >vTiger_User_Name</label
126 ng-model="vm.vtigerAccount.username"
128 ng-disabled="!vm.crudPermissions.canEdit"
132 ng-messages="generalForm['username'].$error"
133 ng-show="generalForm['username'].$touched"
136 <div ng-message="required">
138 translate="INTEGRATIONS.ERRORS.VTIGER_USER_NAME_REQUIRED"
139 >vTiger_User_Name field is required</span
143 </md-input-container>
144 <md-input-container class="md-block">
145 <label translate="INTEGRATIONS.ACCESS_KEY">Access_Key</label>
149 ng-model="vm.vtigerAccount.accessKey"
151 ng-disabled="!vm.crudPermissions.canEdit"
155 ng-messages="generalForm['accessKey'].$error"
156 ng-show="generalForm['accessKey'].$touched"
159 <div ng-message="required">
160 <span translate="INTEGRATIONS.ERRORS.ACCESS_KEY_REQUIRED"
161 >Access_Key field is required</span
165 </md-input-container>
166 <md-input-container class="md-block">
167 <label translate="INTEGRATIONS.HOST">Host</label>
171 ng-model="vm.vtigerAccount.remoteUri"
173 ng-disabled="!vm.crudPermissions.canEdit"
177 ng-messages="generalForm['remoteUri'].$error"
178 ng-show="generalForm['remoteUri'].$touched"
181 <div ng-message="required">
182 <span translate="INTEGRATIONS.ERRORS.HOST_REQUIRED"
183 >Host field is required</span
186 <div ng-message="url">
187 <span translate="INTEGRATIONS.ERRORS.HOST_MUST_VALID_URL"
188 >Host must be a valid url http://www.xcally.com</span
192 </md-input-container>
193 <md-input-container class="md-block">
194 <label translate="INTEGRATIONS.MOTIONPROXYADDRESS"
195 >MotionProxyAddress</label
200 ng-model="vm.vtigerAccount.serverUrl"
201 ng-disabled="!vm.crudPermissions.canEdit"
205 <span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span>
208 ng-messages="generalForm['serverUrl'].$error"
209 ng-show="generalForm['serverUrl'].$touched"
212 <div ng-message="required">
214 translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED"
215 >MotionProxyAddress field is required</span
218 <div ng-message="url">
220 translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL"
221 >MotionProxyAddress must be a valid url
222 http://www.xcally.com</span
226 </md-input-container>
233 <span translate="INTEGRATIONS.CONFIGURATIONS">CONFIGURATIONS</span>
237 class="vtigerAccount-detail-form-container configurations md-background-bg md-whiteframe-1dp"
239 <div class="pb-16" layout="row" layout-align="start center">
241 class="h2 secondary-text"
242 translate="INTEGRATIONS.CONFIGURATIONS"
248 ng-controller="VtigerAccountConfigurationsController as vm_cc"
249 ng-init="vm_cc.init(vm.vtigerAccount, vm.crudPermissions)"
252 <md-card class="md-whiteframe-1dp" flex="30">
253 <div layout="row" layout-align="center center">
254 <md-subheader flex="75" class="md-no-sticky"
255 >{{ 'INTEGRATIONS.CONFIGURATIONS' | translate
260 ng-if="vm_cc.crudPermissions.canEdit"
261 ng-click="vm_cc.createOrEditVtigerConfiguration($event)"
262 class="md-icon-button"
263 aria-label="create vtigerConfiguration"
265 <md-icon md-font-icon="icon-plus"></md-icon>
271 layout-align="center center"
272 ng-repeat="vtigerConfiguration in vm_cc.configurations"
274 md-colors="{background: (vm_cc.selectedVtigerConfiguration == $index ? 'accent' : 'grey-A100')}"
275 ng-click="vm_cc.getVtigerConfiguration($index)"
277 <span class="text-truncate" flex="80"
278 >{{ vtigerConfiguration.name }}</span
280 <md-menu ng-if="vm_cc.crudPermissions.canDelete">
282 class="md-icon-button"
285 translate-attr-aria-label="INTEGRATIONS.MORE"
286 ng-click="$mdOpenMenu($event)"
288 <md-icon md-font-icon="icon-dots-vertical"></md-icon>
290 <md-menu-content width="3">
291 <md-menu-item ng-if="vm_cc.crudPermissions.canDelete">
293 ng-click="vm_cc.deleteVtigerConfiguration($event, vtigerConfiguration)"
294 translate="INTEGRATIONS.DELETE_VTIGERCONFIGURATION"
296 Delete VtigerConfiguration
305 <md-card class="md-whiteframe-1dp" flex="65">
306 <md-tabs ng-if="vm_cc.configurations.length" md-dynamic-height>
309 <span translate="INTEGRATIONS.SUBJECTS">SUBJECTS</span>
313 class="md-table-toolbar md-default no-padding"
314 ng-hide="vm_cc.selectedSubjects.length"
316 <div class="md-toolbar-tools">
319 on-search="vm_cc.query.subject = query"
320 on-collapse="vm_cc.query.subject = undefined"
324 ng-if="vm_cc.crudPermissions.canEdit"
325 class="md-icon-button"
326 ng-click="vm_cc.createOrEditSubject($event)"
327 aria-label="add subject"
329 translate-attr-label="INTEGRATIONS.ADD_SUBJECT"
331 <md-icon md-font-icon="icon-plus"></md-icon>
336 class="md-table-toolbar md-accent"
337 ng-show="vm_cc.selectedSubjects.length"
339 <div class="md-toolbar-tools">
340 <span class="md-subhead"
341 >{{vm_cc.selectedSubjects.length}}
342 {{vm_cc.selectedSubjects.length > 1 ? 'items' :
343 'item'}} selected</span
347 ng-if="vm_cc.crudPermissions.canDelete"
348 class="md-icon-button"
349 ng-click="vm_cc.deleteSelectedSubjects($event)"
350 aria-label="delete selected"
352 translate-attr-label="INTEGRATIONS.DELETE_SELECTED"
354 <md-icon md-font-icon="icon-delete"></md-icon>
359 class="md-whiteframe-1dp padding-horizontal"
365 ng-model="vm_cc.selectedSubjects"
370 {{ 'INTEGRATIONS.ID' | translate }}
373 {{ 'INTEGRATIONS.TYPE' | translate }}
376 {{ 'INTEGRATIONS.CONTENT' | translate }}
378 <th md-column width="10px"></th>
386 ng-repeat="subject in vm_cc.subjects | filter: vm_cc.query.subject"
389 ng-click="vm_cc.createOrEditSubject($event, subject)"
396 ng-click="vm_cc.createOrEditSubject($event, subject)"
400 <span ng-if="subject.FieldId"
401 >{{subject.nameField ||
402 subject.idField}}</span
404 <span ng-if="!subject.FieldId"
405 >{{subject.type}}</span
409 ng-switch="subject.type"
410 ng-click="vm_cc.createOrEditSubject($event, subject)"
413 <span ng-switch-when="string"
414 >{{subject.content}}</span
417 ng-switch-when="variable"
419 >{{subject.variableName}}</span
422 ng-switch-when="customVariable"
425 vm_cc.variablesById[subject.VariableId].name
428 <span ng-switch-when="keyValue">
430 <span ng-switch="description.keyType">
431 <span ng-switch-when="string"
432 >{{subject.keyContent}}</span
435 ng-switch-when="variable"
437 >{{subject.variableName}}</span
440 ng-switch-when="customVariable"
443 vm_cc.variablesById[subject.VariableId].name
448 <span ng-switch-default
449 >{{subject.content}}</span
455 ng-if="!vm_cc.crudPermissions.readOnly"
459 class="md-icon-button"
462 translate-attr-aria-label="INTEGRATIONS.MORE"
463 ng-click="$mdOpenMenu($event)"
466 md-font-icon="icon-dots-vertical"
470 <md-menu-content width="3">
472 ng-if="vm_cc.crudPermissions.canEdit"
475 ng-click="vm_cc.createOrEditSubject($event, subject)"
476 translate="INTEGRATIONS.EDIT_SUBJECT"
482 ng-if="vm_cc.crudPermissions.canDelete"
485 ng-click="vm_cc.deleteSubjectConfirm($event, subject)"
486 translate="INTEGRATIONS.DELETE_SUBJECT"
497 </md-table-container>
503 <span translate="INTEGRATIONS.DESCRIPTIONS"
509 class="md-table-toolbar md-default no-padding"
510 ng-hide="vm_cc.selectedDescriptions.length"
512 <div class="md-toolbar-tools">
515 on-search="vm_cc.query.description = query"
516 on-collapse="vm_cc.query.description = undefined"
520 ng-if="vm_cc.crudPermissions.canEdit"
521 class="md-icon-button"
522 ng-click="vm_cc.createOrEditDescription($event)"
523 aria-label="add description"
525 translate-attr-label="INTEGRATIONS.ADD_DESCRIPTION"
527 <md-icon md-font-icon="icon-plus"></md-icon>
532 class="md-table-toolbar md-accent"
533 ng-show="vm_cc.selectedDescriptions.length"
535 <div class="md-toolbar-tools">
536 <span class="md-subhead"
537 >{{vm_cc.selectedDescriptions.length}}
538 {{vm_cc.selectedDescriptions.length > 1 ? 'items' :
539 'item'}} selected</span
543 ng-if="vm_cc.crudPermissions.canDelete"
544 class="md-icon-button"
545 ng-click="vm_cc.deleteSelectedDescriptions($event)"
546 aria-label="delete selected"
548 translate-attr-label="INTEGRATIONS.DELETE_SELECTED"
550 <md-icon md-font-icon="icon-delete"></md-icon>
555 class="md-whiteframe-1dp padding-horizontal"
561 ng-model="vm_cc.selectedDescriptions"
566 {{ 'INTEGRATIONS.ID' | translate }}
569 {{ 'INTEGRATIONS.TYPE' | translate }}
572 {{ 'INTEGRATIONS.CONTENT' | translate }}
574 <th md-column width="10px"></th>
580 md-select="description"
582 ng-repeat="description in vm_cc.descriptions | filter: vm_cc.query.description"
585 ng-click="vm_cc.createOrEditDescription($event, description)"
592 ng-click="vm_cc.createOrEditDescription($event, description)"
596 <span ng-if="description.FieldId"
597 >{{description.nameField ||
598 description.idField}}</span
600 <span ng-if="!description.FieldId"
601 >{{description.type}}</span
605 ng-switch="description.type"
606 ng-click="vm_cc.createOrEditDescription($event, description)"
609 <span ng-switch-when="string"
610 >{{description.content}}</span
613 ng-switch-when="variable"
615 >{{description.variableName}}</span
618 ng-switch-when="customVariable"
621 vm_cc.variablesById[description.VariableId].name
624 <span ng-switch-when="keyValue">
626 <span ng-switch="description.keyType">
627 <span ng-switch-when="string"
628 >{{description.keyContent}}</span
631 ng-switch-when="variable"
633 >{{description.variableName}}</span
636 ng-switch-when="customVariable"
639 vm_cc.variablesById[description.VariableId].name
644 <span ng-switch-default
645 >{{description.content}}</span
651 ng-if="!vm_cc.crudPermissions.readOnly"
655 class="md-icon-button"
658 translate-attr-aria-label="INTEGRATIONS.MORE"
659 ng-click="$mdOpenMenu($event)"
662 md-font-icon="icon-dots-vertical"
666 <md-menu-content width="3">
668 ng-if="vm_cc.crudPermissions.canEdit"
671 ng-click="vm_cc.createOrEditDescription($event, description)"
672 translate="INTEGRATIONS.EDIT_DESCRIPTION"
678 ng-if="vm_cc.crudPermissions.canDelete"
681 ng-click="vm_cc.deleteDescriptionConfirm($event, description)"
682 translate="INTEGRATIONS.DELETE_DESCRIPTION"
693 </md-table-container>
699 <span translate="INTEGRATIONS.FIELDS">FIELDS</span>
703 class="md-table-toolbar md-default no-padding"
704 ng-hide="vm_cc.selectedFields.length"
706 <div class="md-toolbar-tools">
709 on-search="vm_cc.query.field = query"
710 on-collapse="vm_cc.query.field = undefined"
714 ng-if="vm_cc.crudPermissions.canEdit"
715 class="md-icon-button"
716 ng-click="vm_cc.createOrEditField($event)"
717 aria-label="add field"
719 translate-attr-label="INTEGRATIONS.ADD_FIELD"
721 <md-icon md-font-icon="icon-plus"></md-icon>
726 class="md-table-toolbar md-accent"
727 ng-show="vm_cc.selectedFields.length"
729 <div class="md-toolbar-tools">
730 <span class="md-subhead"
731 >{{vm_cc.selectedFields.length}}
732 {{vm_cc.selectedFields.length > 1 ? 'items' :
733 'item'}} selected</span
737 ng-if="vm_cc.crudPermissions.canDelete"
738 class="md-icon-button"
739 ng-click="vm_cc.deleteSelectedFields($event)"
740 aria-label="delete selected"
742 translate-attr-label="INTEGRATIONS.DELETE_SELECTED"
744 <md-icon md-font-icon="icon-delete"></md-icon>
749 class="md-whiteframe-1dp padding-horizontal"
755 ng-model="vm_cc.selectedFields"
760 {{ 'INTEGRATIONS.ID' | translate }}
763 {{ 'INTEGRATIONS.TYPE' | translate }}
766 {{ 'INTEGRATIONS.CONTENT' | translate }}
768 <th md-column width="10px"></th>
776 ng-repeat="field in vm_cc.fields | filter: vm_cc.query.field"
779 ng-click="vm_cc.createOrEditField($event, field)"
786 ng-click="vm_cc.createOrEditField($event, field)"
790 <span ng-if="field.FieldId"
791 >{{field.nameField || field.idField}}</span
793 <span ng-if="!field.FieldId"
794 >{{field.type}}</span
798 ng-switch="field.type"
799 ng-click="vm_cc.createOrEditField($event, field)"
802 <span ng-switch-when="string"
803 >{{field.content}}</span
806 ng-switch-when="variable"
808 >{{field.variableName}}</span
811 ng-switch-when="customVariable"
813 >{{ vm_cc.variablesById[field.VariableId].name
816 <span ng-switch-when="keyValue">
818 <span ng-switch="description.keyType">
819 <span ng-switch-when="string"
820 >{{field.keyContent}}</span
823 ng-switch-when="variable"
825 >{{field.variableName}}</span
828 ng-switch-when="customVariable"
831 vm_cc.variablesById[field.VariableId].name
836 <span ng-switch-default>{{field.content}}</span>
841 ng-if="!vm_cc.crudPermissions.readOnly"
845 class="md-icon-button"
848 translate-attr-aria-label="INTEGRATIONS.MORE"
849 ng-click="$mdOpenMenu($event)"
852 md-font-icon="icon-dots-vertical"
856 <md-menu-content width="3">
858 ng-if="vm_cc.crudPermissions.canEdit"
861 ng-click="vm_cc.createOrEditField($event, field)"
862 translate="INTEGRATIONS.EDIT_FIELD"
868 ng-if="vm_cc.crudPermissions.canDelete"
871 ng-click="vm_cc.deleteFieldConfirm($event, field)"
872 translate="INTEGRATIONS.DELETE_FIELD"
883 </md-table-container>
889 ng-if="!vm_cc.configurations.length && vm_cc.crudPermissions.canEdit"
890 ng-click="vm_cc.createOrEditVtigerConfiguration($event)"
893 layout-align="center center"
897 class="padding-20 md-whiteframe-3dp md-accent-bg"
899 layout-align="center center"
901 <md-button class="md-icon-button">
902 <md-icon md-font-icon="icon-plus"></md-icon>
905 aria-label="add configuration"
907 translate-attr-label="INTEGRATIONS.ADD_CONFIGURATION"
908 >ADD CONFIGURATION</span