2 id="integrations-dynamics365Account"
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-dynamics365Accounts-button md-icon-button"
11 aria-label="Go to dynamics365Accounts"
12 ng-click="vm.gotoDynamics365Accounts()"
14 translate-attr-aria-label="INTEGRATIONS.GO_TO_DYNAMICS365ACCOUNTS"
16 <md-icon md-font-icon="icon-arrow-left"></md-icon>
19 <div layout="row" layout-align="start center">
20 <div class="dynamics365Account-image" hide-xs>
21 <img ng-src="assets/images/business/dynamics365Accounts.jpg" />
24 <div layout="column" layout-align="start start">
26 #{{vm.dynamics365Account.id}}
27 <span ng-if="vm.dynamics365Account.name"
28 >{{vm.dynamics365Account.name}}</span
31 <div class="subtitle secondary-text">
32 <span translate="INTEGRATIONS.CREATED_AT"></span>
33 <span>{{vm.dynamics365Account.createdAt | date:'medium'}}</span>
41 ng-click="vm.saveDynamics365Account()"
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="dynamics365Account-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.dynamics365Account.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.dynamics365Account.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.PASSWORD">Password</label>
127 ng-model="vm.dynamics365Account.password"
128 placeholder="Password"
130 translate-attr-placeholder="INTEGRATIONS.PASSWORD"
133 <div ng-messages="generalForm['password'].$error" role="alert">
134 <div ng-message="required">
135 <span translate="INTEGRATIONS.ERRORS.PASSWORD_REQUIRED"
136 >Password field is required</span
139 <div ng-message="pattern">
141 translate="INTEGRATIONS.ERRORS.SECURE_PASSWORD_PATTERN"
142 >Must contain at least 8 characters, with a minimum of 1
143 lowercase letter, 1 uppercase letter, 1 numeric character
144 and 1 special character ~!?*@#$%^&-_=+[{]}.</span
148 </md-input-container>
150 <md-input-container class="md-block">
151 <label translate="INTEGRATIONS.URI">Uri</label>
155 ng-model="vm.dynamics365Account.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.TENANTID">TenantId</label>
182 ng-model="vm.dynamics365Account.tenantId"
184 ng-disabled="!vm.crudPermissions.canEdit"
188 ng-messages="generalForm['tenantId'].$error"
189 ng-show="generalForm['tenantId'].$touched"
192 <div ng-message="required">
193 <span translate="INTEGRATIONS.ERRORS.TENANTID_REQUIRED"
194 >TenantId field is required</span
198 </md-input-container>
199 <md-input-container class="md-block">
200 <label translate="INTEGRATIONS.CLIENTID">ClientId</label>
204 ng-model="vm.dynamics365Account.clientId"
206 ng-disabled="!vm.crudPermissions.canEdit"
210 ng-messages="generalForm['clientId'].$error"
211 ng-show="generalForm['clientId'].$touched"
214 <div ng-message="required">
215 <span translate="INTEGRATIONS.ERRORS.CLIENTID_REQUIRED"
216 >ClientId field is required</span
220 </md-input-container>
221 <md-input-container class="md-block">
222 <label translate="INTEGRATIONS.CLIENTSECRET"
228 ng-model="vm.dynamics365Account.clientSecret"
230 ng-disabled="!vm.crudPermissions.canEdit"
234 ng-messages="generalForm['clientSecret'].$error"
235 ng-show="generalForm['clientSecret'].$touched"
238 <div ng-message="required">
239 <span translate="INTEGRATIONS.ERRORS.CLIENTSECRET_REQUIRED"
240 >ClientSecret field is required</span
244 </md-input-container>
245 <md-input-container class="md-block">
246 <label translate="INTEGRATIONS.MOTIONPROXYADDRESS"
247 >MotionProxyAddress</label
252 ng-model="vm.dynamics365Account.serverUrl"
253 ng-disabled="!vm.crudPermissions.canEdit"
257 <span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span>
260 ng-messages="generalForm['serverUrl'].$error"
261 ng-show="generalForm['serverUrl'].$touched"
264 <div ng-message="required">
266 translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED"
267 >MotionProxyAddress field is required</span
270 <div ng-message="url">
272 translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL"
273 >MotionProxyAddress must be a valid url
274 http://www.xcally.com</span
278 </md-input-container>
279 <md-input-container class="md-block">
280 <label translate="INTEGRATIONS.DESCRIPTION">Description</label>
284 ng-model="vm.dynamics365Account.description"
285 ng-disabled="!vm.crudPermissions.canEdit"
289 ng-messages="generalForm['description'].$error"
290 ng-show="generalForm['description'].$touched"
293 <div ng-message="required">
294 <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED"
295 >Description field is required</span
299 </md-input-container>
306 <span translate="INTEGRATIONS.CONFIGURATIONS">CONFIGURATIONS</span>
310 class="dynamics365Account-detail-form-container configurations md-background-bg md-whiteframe-1dp"
312 <div class="pb-16" layout="row" layout-align="start center">
314 class="h2 secondary-text"
315 translate="INTEGRATIONS.CONFIGURATIONS"
321 ng-controller="Dynamics365AccountConfigurationsController as vm_cc"
322 ng-init="vm_cc.init(vm.dynamics365Account, vm.crudPermissions)"
325 <md-card class="md-whiteframe-1dp" flex="30">
326 <div layout="row" layout-align="center center">
327 <md-subheader flex="75" class="md-no-sticky"
328 >{{ 'INTEGRATIONS.CONFIGURATIONS' | translate
333 ng-if="vm_cc.crudPermissions.canEdit"
334 ng-click="vm_cc.createOrEditDynamics365Configuration($event)"
335 class="md-icon-button"
336 aria-label="create dynamics365Configuration"
338 <md-icon md-font-icon="icon-plus"></md-icon>
344 layout-align="center center"
345 ng-repeat="dynamics365Configuration in vm_cc.configurations"
347 md-colors="{background: (vm_cc.selectedDynamics365Configuration == $index ? 'accent' : 'grey-A100')}"
348 ng-click="vm_cc.getDynamics365Configuration($index)"
350 <span class="text-truncate" flex="80"
351 >{{ dynamics365Configuration.name }}</span
353 <md-menu ng-if="vm_cc.crudPermissions.canDelete">
355 class="md-icon-button"
358 translate-attr-aria-label="INTEGRATIONS.MORE"
359 ng-click="$mdOpenMenu($event)"
361 <md-icon md-font-icon="icon-dots-vertical"></md-icon>
363 <md-menu-content width="3">
364 <md-menu-item ng-if="vm_cc.crudPermissions.canDelete">
366 ng-click="vm_cc.deleteDynamics365Configuration($event, dynamics365Configuration)"
367 translate="INTEGRATIONS.DELETE_DYNAMICS365CONFIGURATION"
369 Delete Dynamics365Configuration
378 <md-card class="md-whiteframe-1dp" flex="65">
379 <md-tabs ng-if="vm_cc.configurations.length" md-dynamic-height>
382 <span translate="INTEGRATIONS.SUBJECTS">SUBJECTS</span>
386 class="md-table-toolbar md-default no-padding"
387 ng-hide="vm_cc.selectedSubjects.length"
389 <div class="md-toolbar-tools">
392 on-search="vm_cc.query.subject = query"
393 on-collapse="vm_cc.query.subject = undefined"
397 ng-if="vm_cc.crudPermissions.canEdit"
398 class="md-icon-button"
399 ng-click="vm_cc.createOrEditSubject($event)"
400 aria-label="add subject"
402 translate-attr-label="INTEGRATIONS.ADD_SUBJECT"
404 <md-icon md-font-icon="icon-plus"></md-icon>
409 class="md-table-toolbar md-accent"
410 ng-show="vm_cc.selectedSubjects.length"
412 <div class="md-toolbar-tools">
413 <span class="md-subhead"
414 >{{vm_cc.selectedSubjects.length}}
415 {{vm_cc.selectedSubjects.length > 1 ? 'items' :
416 'item'}} selected</span
420 ng-if="vm_cc.crudPermissions.canDelete"
421 class="md-icon-button"
422 ng-click="vm_cc.deleteSelectedSubjects($event)"
423 aria-label="delete selected"
425 translate-attr-label="INTEGRATIONS.DELETE_SELECTED"
427 <md-icon md-font-icon="icon-delete"></md-icon>
432 class="md-whiteframe-1dp padding-horizontal"
438 ng-model="vm_cc.selectedSubjects"
443 {{ 'INTEGRATIONS.ID' | translate }}
446 {{ 'INTEGRATIONS.TYPE' | translate }}
449 {{ 'INTEGRATIONS.CONTENT' | translate }}
451 <th md-column width="10px"></th>
459 ng-repeat="subject in vm_cc.subjects | filter: vm_cc.query.subject"
462 ng-click="vm_cc.createOrEditSubject($event, subject)"
469 ng-click="vm_cc.createOrEditSubject($event, subject)"
473 <span ng-if="subject.FieldId"
474 >{{subject.nameField ||
475 subject.idField}}</span
477 <span ng-if="!subject.FieldId"
478 >{{subject.type}}</span
482 ng-switch="subject.type"
483 ng-click="vm_cc.createOrEditSubject($event, subject)"
486 <span ng-switch-when="string"
487 >{{subject.content}}</span
490 ng-switch-when="variable"
492 >{{subject.variableName}}</span
495 ng-switch-when="customVariable"
498 vm_cc.variablesById[subject.VariableId].name
501 <span ng-switch-when="keyValue">
503 <span ng-switch="description.keyType">
504 <span ng-switch-when="string"
505 >{{subject.keyContent}}</span
508 ng-switch-when="variable"
510 >{{subject.variableName}}</span
513 ng-switch-when="customVariable"
516 vm_cc.variablesById[subject.VariableId].name
521 <span ng-switch-default
522 >{{subject.content}}</span
528 ng-if="!vm_cc.crudPermissions.readOnly"
532 class="md-icon-button"
535 translate-attr-aria-label="INTEGRATIONS.MORE"
536 ng-click="$mdOpenMenu($event)"
539 md-font-icon="icon-dots-vertical"
543 <md-menu-content width="3">
545 ng-if="vm_cc.crudPermissions.canEdit"
548 ng-click="vm_cc.createOrEditSubject($event, subject)"
549 translate="INTEGRATIONS.EDIT_SUBJECT"
555 ng-if="vm_cc.crudPermissions.canDelete"
558 ng-click="vm_cc.deleteSubjectConfirm($event, subject)"
559 translate="INTEGRATIONS.DELETE_SUBJECT"
570 </md-table-container>
576 <span translate="INTEGRATIONS.DESCRIPTIONS"
582 class="md-table-toolbar md-default no-padding"
583 ng-hide="vm_cc.selectedDescriptions.length"
585 <div class="md-toolbar-tools">
588 on-search="vm_cc.query.description = query"
589 on-collapse="vm_cc.query.description = undefined"
593 ng-if="vm_cc.crudPermissions.canEdit"
594 class="md-icon-button"
595 ng-click="vm_cc.createOrEditDescription($event)"
596 aria-label="add description"
598 translate-attr-label="INTEGRATIONS.ADD_DESCRIPTION"
600 <md-icon md-font-icon="icon-plus"></md-icon>
605 class="md-table-toolbar md-accent"
606 ng-show="vm_cc.selectedDescriptions.length"
608 <div class="md-toolbar-tools">
609 <span class="md-subhead"
610 >{{vm_cc.selectedDescriptions.length}}
611 {{vm_cc.selectedDescriptions.length > 1 ? 'items' :
612 'item'}} selected</span
616 ng-if="vm_cc.crudPermissions.canDelete"
617 class="md-icon-button"
618 ng-click="vm_cc.deleteSelectedDescriptions($event)"
619 aria-label="delete selected"
621 translate-attr-label="INTEGRATIONS.DELETE_SELECTED"
623 <md-icon md-font-icon="icon-delete"></md-icon>
628 class="md-whiteframe-1dp padding-horizontal"
634 ng-model="vm_cc.selectedDescriptions"
639 {{ 'INTEGRATIONS.ID' | translate }}
642 {{ 'INTEGRATIONS.TYPE' | translate }}
645 {{ 'INTEGRATIONS.CONTENT' | translate }}
647 <th md-column width="10px"></th>
653 md-select="description"
655 ng-repeat="description in vm_cc.descriptions | filter: vm_cc.query.description"
658 ng-click="vm_cc.createOrEditDescription($event, description)"
665 ng-click="vm_cc.createOrEditDescription($event, description)"
669 <span ng-if="description.FieldId"
670 >{{description.nameField ||
671 description.idField}}</span
673 <span ng-if="!description.FieldId"
674 >{{description.type}}</span
678 ng-switch="description.type"
679 ng-click="vm_cc.createOrEditDescription($event, description)"
682 <span ng-switch-when="string"
683 >{{description.content}}</span
686 ng-switch-when="variable"
688 >{{description.variableName}}</span
691 ng-switch-when="customVariable"
694 vm_cc.variablesById[description.VariableId].name
697 <span ng-switch-when="keyValue">
699 <span ng-switch="description.keyType">
700 <span ng-switch-when="string"
701 >{{description.keyContent}}</span
704 ng-switch-when="variable"
706 >{{description.variableName}}</span
709 ng-switch-when="customVariable"
712 vm_cc.variablesById[description.VariableId].name
717 <span ng-switch-default
718 >{{description.content}}</span
724 ng-if="!vm_cc.crudPermissions.readOnly"
728 class="md-icon-button"
731 translate-attr-aria-label="INTEGRATIONS.MORE"
732 ng-click="$mdOpenMenu($event)"
735 md-font-icon="icon-dots-vertical"
739 <md-menu-content width="3">
741 ng-if="vm_cc.crudPermissions.canEdit"
744 ng-click="vm_cc.createOrEditDescription($event, description)"
745 translate="INTEGRATIONS.EDIT_DESCRIPTION"
751 ng-if="vm_cc.crudPermissions.canDelete"
754 ng-click="vm_cc.deleteDescriptionConfirm($event, description)"
755 translate="INTEGRATIONS.DELETE_DESCRIPTION"
766 </md-table-container>
772 <span translate="INTEGRATIONS.FIELDS">FIELDS</span>
776 class="md-table-toolbar md-default no-padding"
777 ng-hide="vm_cc.selectedFields.length"
779 <div class="md-toolbar-tools">
782 on-search="vm_cc.query.field = query"
783 on-collapse="vm_cc.query.field = undefined"
787 ng-if="vm_cc.crudPermissions.canEdit"
788 class="md-icon-button"
789 ng-click="vm_cc.createOrEditField($event)"
790 aria-label="add field"
792 translate-attr-label="INTEGRATIONS.ADD_FIELD"
794 <md-icon md-font-icon="icon-plus"></md-icon>
799 class="md-table-toolbar md-accent"
800 ng-show="vm_cc.selectedFields.length"
802 <div class="md-toolbar-tools">
803 <span class="md-subhead"
804 >{{vm_cc.selectedFields.length}}
805 {{vm_cc.selectedFields.length > 1 ? 'items' :
806 'item'}} selected</span
810 ng-if="vm_cc.crudPermissions.canDelete"
811 class="md-icon-button"
812 ng-click="vm_cc.deleteSelectedFields($event)"
813 aria-label="delete selected"
815 translate-attr-label="INTEGRATIONS.DELETE_SELECTED"
817 <md-icon md-font-icon="icon-delete"></md-icon>
822 class="md-whiteframe-1dp padding-horizontal"
828 ng-model="vm_cc.selectedFields"
833 {{ 'INTEGRATIONS.ID' | translate }}
836 {{ 'INTEGRATIONS.TYPE' | translate }}
839 {{ 'INTEGRATIONS.CONTENT' | translate }}
841 <th md-column width="10px"></th>
849 ng-repeat="field in vm_cc.fields | filter: vm_cc.query.field"
852 ng-click="vm_cc.createOrEditField($event, field)"
859 ng-click="vm_cc.createOrEditField($event, field)"
863 <span ng-if="field.FieldId"
864 >{{field.nameField || field.idField}}</span
866 <span ng-if="!field.FieldId"
867 >{{field.type}}</span
871 ng-switch="field.type"
872 ng-click="vm_cc.createOrEditField($event, field)"
875 <span ng-switch-when="string"
876 >{{field.content}}</span
879 ng-switch-when="variable"
881 >{{field.variableName}}</span
884 ng-switch-when="customVariable"
886 >{{ vm_cc.variablesById[field.VariableId].name
889 <span ng-switch-when="keyValue">
891 <span ng-switch="description.keyType">
892 <span ng-switch-when="string"
893 >{{field.keyContent}}</span
896 ng-switch-when="variable"
898 >{{field.variableName}}</span
901 ng-switch-when="customVariable"
904 vm_cc.variablesById[field.VariableId].name
909 <span ng-switch-default>{{field.content}}</span>
914 ng-if="!vm_cc.crudPermissions.readOnly"
918 class="md-icon-button"
921 translate-attr-aria-label="INTEGRATIONS.MORE"
922 ng-click="$mdOpenMenu($event)"
925 md-font-icon="icon-dots-vertical"
929 <md-menu-content width="3">
931 ng-if="vm_cc.crudPermissions.canEdit"
934 ng-click="vm_cc.createOrEditField($event, field)"
935 translate="INTEGRATIONS.EDIT_FIELD"
941 ng-if="vm_cc.crudPermissions.canDelete"
944 ng-click="vm_cc.deleteFieldConfirm($event, field)"
945 translate="INTEGRATIONS.DELETE_FIELD"
956 </md-table-container>
962 ng-if="!vm_cc.configurations.length && vm_cc.crudPermissions.canEdit"
963 ng-click="vm_cc.createOrEditDynamics365Configuration($event)"
966 layout-align="center center"
970 class="padding-20 md-whiteframe-3dp md-accent-bg"
972 layout-align="center center"
974 <md-button class="md-icon-button">
975 <md-icon md-font-icon="icon-plus"></md-icon>
978 aria-label="add configuration"
980 translate-attr-label="INTEGRATIONS.ADD_CONFIGURATION"
981 >ADD CONFIGURATION</span