2 id="integrations-sugarcrmAccount"
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-sugarcrmAccounts-button md-icon-button"
11 aria-label="Go to sugarcrmAccounts"
12 ng-click="vm.gotoSugarcrmAccounts()"
14 translate-attr-aria-label="INTEGRATIONS.GO_TO_SUGARCRMACCOUNTS"
16 <md-icon md-font-icon="icon-arrow-left"></md-icon>
19 <div layout="row" layout-align="start center">
20 <div class="sugarcrmAccount-image" hide-xs>
21 <img ng-src="assets/images/business/sugarcrmAccounts.jpg" />
24 <div layout="column" layout-align="start start">
26 #{{vm.sugarcrmAccount.id}}
27 <span ng-if="vm.sugarcrmAccount.name"
28 >{{vm.sugarcrmAccount.name}}</span
31 <div class="subtitle secondary-text">
32 <span translate="INTEGRATIONS.CREATED_AT"></span>
33 <span>{{vm.sugarcrmAccount.createdAt | date:'medium'}}</span>
41 ng-click="vm.saveSugarcrmAccount()"
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="sugarcrmAccount-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.sugarcrmAccount.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.sugarcrmAccount.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.sugarcrmAccount.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.PASSWORD">Password</label>
154 ng-model="vm.sugarcrmAccount.password"
155 placeholder="Password"
157 translate-attr-placeholder="INTEGRATIONS.PASSWORD"
160 <div ng-messages="generalForm['password'].$error" role="alert">
161 <div ng-message="required">
162 <span translate="INTEGRATIONS.ERRORS.PASSWORD_REQUIRED"
163 >Password field is required</span
166 <div ng-message="pattern">
168 translate="INTEGRATIONS.ERRORS.SECURE_PASSWORD_PATTERN"
169 >Must contain at least 8 characters, with a minimum of 1
170 lowercase letter, 1 uppercase letter, 1 numeric character
171 and 1 special character ~!?*@#$%^&-_=+[{]}.</span
175 </md-input-container>
177 <md-input-container class="md-block">
178 <label translate="INTEGRATIONS.MOTIONPROXYADDRESS"
179 >MotionProxyAddress</label
184 ng-model="vm.sugarcrmAccount.serverUrl"
185 ng-disabled="!vm.crudPermissions.canEdit"
189 <span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span>
192 ng-messages="generalForm['serverUrl'].$error"
193 ng-show="generalForm['serverUrl'].$touched"
196 <div ng-message="required">
198 translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED"
199 >MotionProxyAddress field is required</span
202 <div ng-message="url">
204 translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL"
205 >MotionProxyAddress must be a valid url
206 http://www.xcally.com</span
210 </md-input-container>
211 <md-input-container class="md-block">
212 <label translate="INTEGRATIONS.DESCRIPTION">Description</label>
216 ng-model="vm.sugarcrmAccount.description"
217 ng-disabled="!vm.crudPermissions.canEdit"
221 ng-messages="generalForm['description'].$error"
222 ng-show="generalForm['description'].$touched"
225 <div ng-message="required">
226 <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED"
227 >Description field is required</span
231 </md-input-container>
238 <span translate="INTEGRATIONS.CONFIGURATIONS">CONFIGURATIONS</span>
242 class="sugarcrmAccount-detail-form-container configurations md-background-bg md-whiteframe-1dp"
244 <div class="pb-16" layout="row" layout-align="start center">
246 class="h2 secondary-text"
247 translate="INTEGRATIONS.CONFIGURATIONS"
253 ng-controller="SugarcrmAccountConfigurationsController as vm_cc"
254 ng-init="vm_cc.init(vm.sugarcrmAccount, vm.crudPermissions)"
257 <md-card class="md-whiteframe-1dp" flex="30">
258 <div layout="row" layout-align="center center">
259 <md-subheader flex="75" class="md-no-sticky"
260 >{{ 'INTEGRATIONS.CONFIGURATIONS' | translate
265 ng-if="vm_cc.crudPermissions.canEdit"
266 ng-click="vm_cc.createOrEditSugarcrmConfiguration($event)"
267 class="md-icon-button"
268 aria-label="create sugarcrmConfiguration"
270 <md-icon md-font-icon="icon-plus"></md-icon>
276 layout-align="center center"
277 ng-repeat="sugarcrmConfiguration in vm_cc.configurations"
279 md-colors="{background: (vm_cc.selectedSugarcrmConfiguration == $index ? 'accent' : 'grey-A100')}"
280 ng-click="vm_cc.getSugarcrmConfiguration($index)"
282 <span class="text-truncate" flex="80"
283 >{{ sugarcrmConfiguration.name }}</span
285 <md-menu ng-if="vm_cc.crudPermissions.canDelete">
287 class="md-icon-button"
290 translate-attr-aria-label="INTEGRATIONS.MORE"
291 ng-click="$mdOpenMenu($event)"
293 <md-icon md-font-icon="icon-dots-vertical"></md-icon>
295 <md-menu-content width="3">
296 <md-menu-item ng-if="vm_cc.crudPermissions.canDelete">
298 ng-click="vm_cc.deleteSugarcrmConfiguration($event, sugarcrmConfiguration)"
299 translate="INTEGRATIONS.DELETE_SUGARCRMCONFIGURATION"
301 Delete SugarcrmConfiguration
310 <md-card class="md-whiteframe-1dp" flex="65">
311 <md-tabs ng-if="vm_cc.configurations.length" md-dynamic-height>
314 <span translate="INTEGRATIONS.SUBJECTS">SUBJECTS</span>
318 class="md-table-toolbar md-default no-padding"
319 ng-hide="vm_cc.selectedSubjects.length"
321 <div class="md-toolbar-tools">
324 on-search="vm_cc.query.subject = query"
325 on-collapse="vm_cc.query.subject = undefined"
329 ng-if="vm_cc.crudPermissions.canEdit"
330 class="md-icon-button"
331 ng-click="vm_cc.createOrEditSubject($event)"
332 aria-label="add subject"
334 translate-attr-label="INTEGRATIONS.ADD_SUBJECT"
336 <md-icon md-font-icon="icon-plus"></md-icon>
341 class="md-table-toolbar md-accent"
342 ng-show="vm_cc.selectedSubjects.length"
344 <div class="md-toolbar-tools">
345 <span class="md-subhead"
346 >{{vm_cc.selectedSubjects.length}}
347 {{vm_cc.selectedSubjects.length > 1 ? 'items' :
348 'item'}} selected</span
352 ng-if="vm_cc.crudPermissions.canDelete"
353 class="md-icon-button"
354 ng-click="vm_cc.deleteSelectedSubjects($event)"
355 aria-label="delete selected"
357 translate-attr-label="INTEGRATIONS.DELETE_SELECTED"
359 <md-icon md-font-icon="icon-delete"></md-icon>
364 class="md-whiteframe-1dp padding-horizontal"
370 ng-model="vm_cc.selectedSubjects"
375 {{ 'INTEGRATIONS.ID' | translate }}
378 {{ 'INTEGRATIONS.TYPE' | translate }}
381 {{ 'INTEGRATIONS.CONTENT' | translate }}
383 <th md-column width="10px"></th>
391 ng-repeat="subject in vm_cc.subjects | filter: vm_cc.query.subject"
394 ng-click="vm_cc.createOrEditSubject($event, subject)"
401 ng-click="vm_cc.createOrEditSubject($event, subject)"
405 <span ng-if="subject.FieldId"
406 >{{subject.nameField ||
407 subject.idField}}</span
409 <span ng-if="!subject.FieldId"
410 >{{subject.type}}</span
414 ng-switch="subject.type"
415 ng-click="vm_cc.createOrEditSubject($event, subject)"
418 <span ng-switch-when="string"
419 >{{subject.content}}</span
422 ng-switch-when="variable"
424 >{{subject.variableName}}</span
427 ng-switch-when="customVariable"
430 vm_cc.variablesById[subject.VariableId].name
433 <span ng-switch-when="keyValue">
435 <span ng-switch="description.keyType">
436 <span ng-switch-when="string"
437 >{{subject.keyContent}}</span
440 ng-switch-when="variable"
442 >{{subject.variableName}}</span
445 ng-switch-when="customVariable"
448 vm_cc.variablesById[subject.VariableId].name
453 <span ng-switch-default
454 >{{subject.content}}</span
460 ng-if="!vm_cc.crudPermissions.readOnly"
464 class="md-icon-button"
467 translate-attr-aria-label="INTEGRATIONS.MORE"
468 ng-click="$mdOpenMenu($event)"
471 md-font-icon="icon-dots-vertical"
475 <md-menu-content width="3">
477 ng-if="vm_cc.crudPermissions.canEdit"
480 ng-click="vm_cc.createOrEditSubject($event, subject)"
481 translate="INTEGRATIONS.EDIT_SUBJECT"
487 ng-if="vm_cc.crudPermissions.canDelete"
490 ng-click="vm_cc.deleteSubjectConfirm($event, subject)"
491 translate="INTEGRATIONS.DELETE_SUBJECT"
502 </md-table-container>
508 <span translate="INTEGRATIONS.DESCRIPTIONS"
514 class="md-table-toolbar md-default no-padding"
515 ng-hide="vm_cc.selectedDescriptions.length"
517 <div class="md-toolbar-tools">
520 on-search="vm_cc.query.description = query"
521 on-collapse="vm_cc.query.description = undefined"
525 ng-if="vm_cc.crudPermissions.canEdit"
526 class="md-icon-button"
527 ng-click="vm_cc.createOrEditDescription($event)"
528 aria-label="add description"
530 translate-attr-label="INTEGRATIONS.ADD_DESCRIPTION"
532 <md-icon md-font-icon="icon-plus"></md-icon>
537 class="md-table-toolbar md-accent"
538 ng-show="vm_cc.selectedDescriptions.length"
540 <div class="md-toolbar-tools">
541 <span class="md-subhead"
542 >{{vm_cc.selectedDescriptions.length}}
543 {{vm_cc.selectedDescriptions.length > 1 ? 'items' :
544 'item'}} selected</span
548 ng-if="vm_cc.crudPermissions.canDelete"
549 class="md-icon-button"
550 ng-click="vm_cc.deleteSelectedDescriptions($event)"
551 aria-label="delete selected"
553 translate-attr-label="INTEGRATIONS.DELETE_SELECTED"
555 <md-icon md-font-icon="icon-delete"></md-icon>
560 class="md-whiteframe-1dp padding-horizontal"
566 ng-model="vm_cc.selectedDescriptions"
571 {{ 'INTEGRATIONS.ID' | translate }}
574 {{ 'INTEGRATIONS.TYPE' | translate }}
577 {{ 'INTEGRATIONS.CONTENT' | translate }}
579 <th md-column width="10px"></th>
585 md-select="description"
587 ng-repeat="description in vm_cc.descriptions | filter: vm_cc.query.description"
590 ng-click="vm_cc.createOrEditDescription($event, description)"
597 ng-click="vm_cc.createOrEditDescription($event, description)"
601 <span ng-if="description.FieldId"
602 >{{description.nameField ||
603 description.idField}}</span
605 <span ng-if="!description.FieldId"
606 >{{description.type}}</span
610 ng-switch="description.type"
611 ng-click="vm_cc.createOrEditDescription($event, description)"
614 <span ng-switch-when="string"
615 >{{description.content}}</span
618 ng-switch-when="variable"
620 >{{description.variableName}}</span
623 ng-switch-when="customVariable"
626 vm_cc.variablesById[description.VariableId].name
629 <span ng-switch-when="keyValue">
631 <span ng-switch="description.keyType">
632 <span ng-switch-when="string"
633 >{{description.keyContent}}</span
636 ng-switch-when="variable"
638 >{{description.variableName}}</span
641 ng-switch-when="customVariable"
644 vm_cc.variablesById[description.VariableId].name
649 <span ng-switch-default
650 >{{description.content}}</span
656 ng-if="!vm_cc.crudPermissions.readOnly"
660 class="md-icon-button"
663 translate-attr-aria-label="INTEGRATIONS.MORE"
664 ng-click="$mdOpenMenu($event)"
667 md-font-icon="icon-dots-vertical"
671 <md-menu-content width="3">
673 ng-if="vm_cc.crudPermissions.canEdit"
676 ng-click="vm_cc.createOrEditDescription($event, description)"
677 translate="INTEGRATIONS.EDIT_DESCRIPTION"
683 ng-if="vm_cc.crudPermissions.canDelete"
686 ng-click="vm_cc.deleteDescriptionConfirm($event, description)"
687 translate="INTEGRATIONS.DELETE_DESCRIPTION"
698 </md-table-container>
704 <span translate="INTEGRATIONS.FIELDS">FIELDS</span>
708 class="md-table-toolbar md-default no-padding"
709 ng-hide="vm_cc.selectedFields.length"
711 <div class="md-toolbar-tools">
714 on-search="vm_cc.query.field = query"
715 on-collapse="vm_cc.query.field = undefined"
719 ng-if="vm_cc.crudPermissions.canEdit"
720 class="md-icon-button"
721 ng-click="vm_cc.createOrEditField($event)"
722 aria-label="add field"
724 translate-attr-label="INTEGRATIONS.ADD_FIELD"
726 <md-icon md-font-icon="icon-plus"></md-icon>
731 class="md-table-toolbar md-accent"
732 ng-show="vm_cc.selectedFields.length"
734 <div class="md-toolbar-tools">
735 <span class="md-subhead"
736 >{{vm_cc.selectedFields.length}}
737 {{vm_cc.selectedFields.length > 1 ? 'items' :
738 'item'}} selected</span
742 ng-if="vm_cc.crudPermissions.canDelete"
743 class="md-icon-button"
744 ng-click="vm_cc.deleteSelectedFields($event)"
745 aria-label="delete selected"
747 translate-attr-label="INTEGRATIONS.DELETE_SELECTED"
749 <md-icon md-font-icon="icon-delete"></md-icon>
754 class="md-whiteframe-1dp padding-horizontal"
760 ng-model="vm_cc.selectedFields"
765 {{ 'INTEGRATIONS.ID' | translate }}
768 {{ 'INTEGRATIONS.TYPE' | translate }}
771 {{ 'INTEGRATIONS.CONTENT' | translate }}
773 <th md-column width="10px"></th>
781 ng-repeat="field in vm_cc.fields | filter: vm_cc.query.field"
784 ng-click="vm_cc.createOrEditField($event, field)"
791 ng-click="vm_cc.createOrEditField($event, field)"
795 <span ng-if="field.FieldId"
796 >{{field.nameField || field.idField}}</span
798 <span ng-if="!field.FieldId"
799 >{{field.type}}</span
803 ng-switch="field.type"
804 ng-click="vm_cc.createOrEditField($event, field)"
807 <span ng-switch-when="string"
808 >{{field.content}}</span
811 ng-switch-when="variable"
813 >{{field.variableName}}</span
816 ng-switch-when="customVariable"
818 >{{ vm_cc.variablesById[field.VariableId].name
821 <span ng-switch-when="keyValue">
823 <span ng-switch="description.keyType">
824 <span ng-switch-when="string"
825 >{{field.keyContent}}</span
828 ng-switch-when="variable"
830 >{{field.variableName}}</span
833 ng-switch-when="customVariable"
836 vm_cc.variablesById[field.VariableId].name
841 <span ng-switch-default>{{field.content}}</span>
846 ng-if="!vm_cc.crudPermissions.readOnly"
850 class="md-icon-button"
853 translate-attr-aria-label="INTEGRATIONS.MORE"
854 ng-click="$mdOpenMenu($event)"
857 md-font-icon="icon-dots-vertical"
861 <md-menu-content width="3">
863 ng-if="vm_cc.crudPermissions.canEdit"
866 ng-click="vm_cc.createOrEditField($event, field)"
867 translate="INTEGRATIONS.EDIT_FIELD"
873 ng-if="vm_cc.crudPermissions.canDelete"
876 ng-click="vm_cc.deleteFieldConfirm($event, field)"
877 translate="INTEGRATIONS.DELETE_FIELD"
888 </md-table-container>
894 ng-if="!vm_cc.configurations.length && vm_cc.crudPermissions.canEdit"
895 ng-click="vm_cc.createOrEditSugarcrmConfiguration($event)"
898 layout-align="center center"
902 class="padding-20 md-whiteframe-3dp md-accent-bg"
904 layout-align="center center"
906 <md-button class="md-icon-button">
907 <md-icon md-font-icon="icon-plus"></md-icon>
910 aria-label="add configuration"
912 translate-attr-label="INTEGRATIONS.ADD_CONFIGURATION"
913 >ADD CONFIGURATION</span