@memberjunction/ng-base-forms 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/base-field-component.d.ts +12 -3
- package/dist/lib/base-field-component.d.ts.map +1 -1
- package/dist/lib/base-field-component.js +180 -97
- package/dist/lib/base-form-component.d.ts +32 -15
- package/dist/lib/base-form-component.d.ts.map +1 -1
- package/dist/lib/base-form-component.js +95 -100
- package/dist/lib/link-field.component.d.ts +42 -0
- package/dist/lib/link-field.component.d.ts.map +1 -0
- package/dist/lib/link-field.component.js +207 -0
- package/dist/lib/section-loader-component.js +1 -1
- package/dist/module.d.ts +8 -6
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +26 -17
- package/dist/public-api.d.ts +1 -1
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +1 -1
- package/package.json +10 -7
- package/dist/lib/form-toolbar.d.ts +0 -29
- package/dist/lib/form-toolbar.d.ts.map +0 -1
- package/dist/lib/form-toolbar.js +0 -424
package/dist/module.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAyBA,qBA4Ba,eAAe;yCAAf,eAAe;0CAAf,eAAe;0CAAf,eAAe;CAAI"}
|
package/dist/module.js
CHANGED
|
@@ -10,12 +10,16 @@ import { DialogsModule } from '@progress/kendo-angular-dialog';
|
|
|
10
10
|
import { IndicatorsModule } from '@progress/kendo-angular-indicators';
|
|
11
11
|
import { RecordChangesModule } from '@memberjunction/ng-record-changes';
|
|
12
12
|
import { MJTabStripModule } from '@memberjunction/ng-tabstrip';
|
|
13
|
+
import { LinkDirectivesModule } from '@memberjunction/ng-link-directives';
|
|
13
14
|
import { SectionLoaderComponent } from './lib/section-loader-component';
|
|
14
|
-
import { FormToolbarComponent } from './lib/form-toolbar';
|
|
15
15
|
import { MJFormField } from './lib/base-field-component';
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
16
|
+
import { ContainerDirectivesModule } from '@memberjunction/ng-container-directives';
|
|
17
|
+
import { MemberJunctionSharedModule } from '@memberjunction/ng-shared';
|
|
18
|
+
// Markdown
|
|
19
|
+
import { MarkdownModule } from 'ngx-markdown';
|
|
20
|
+
import { MJLinkField } from './lib/link-field.component';
|
|
18
21
|
import * as i0 from "@angular/core";
|
|
22
|
+
import * as i1 from "ngx-markdown";
|
|
19
23
|
export class BaseFormsModule {
|
|
20
24
|
}
|
|
21
25
|
BaseFormsModule.ɵfac = function BaseFormsModule_Factory(t) { return new (t || BaseFormsModule)(); };
|
|
@@ -29,16 +33,18 @@ BaseFormsModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonMo
|
|
|
29
33
|
DateInputsModule,
|
|
30
34
|
DropDownsModule,
|
|
31
35
|
LinkDirectivesModule,
|
|
32
|
-
AskSkipModule,
|
|
33
36
|
DialogsModule,
|
|
34
|
-
IndicatorsModule
|
|
37
|
+
IndicatorsModule,
|
|
38
|
+
ContainerDirectivesModule,
|
|
39
|
+
MemberJunctionSharedModule,
|
|
40
|
+
MarkdownModule.forRoot()] });
|
|
35
41
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BaseFormsModule, [{
|
|
36
42
|
type: NgModule,
|
|
37
43
|
args: [{
|
|
38
44
|
declarations: [
|
|
39
45
|
SectionLoaderComponent,
|
|
40
|
-
|
|
41
|
-
|
|
46
|
+
MJFormField,
|
|
47
|
+
MJLinkField
|
|
42
48
|
],
|
|
43
49
|
imports: [
|
|
44
50
|
CommonModule,
|
|
@@ -50,20 +56,22 @@ BaseFormsModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonMo
|
|
|
50
56
|
DateInputsModule,
|
|
51
57
|
DropDownsModule,
|
|
52
58
|
LinkDirectivesModule,
|
|
53
|
-
AskSkipModule,
|
|
54
59
|
DialogsModule,
|
|
55
|
-
IndicatorsModule
|
|
60
|
+
IndicatorsModule,
|
|
61
|
+
ContainerDirectivesModule,
|
|
62
|
+
MemberJunctionSharedModule,
|
|
63
|
+
MarkdownModule.forRoot()
|
|
56
64
|
],
|
|
57
65
|
exports: [
|
|
58
66
|
SectionLoaderComponent,
|
|
59
|
-
|
|
60
|
-
|
|
67
|
+
MJFormField,
|
|
68
|
+
MJLinkField
|
|
61
69
|
]
|
|
62
70
|
}]
|
|
63
71
|
}], null, null); })();
|
|
64
72
|
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(BaseFormsModule, { declarations: [SectionLoaderComponent,
|
|
65
|
-
|
|
66
|
-
|
|
73
|
+
MJFormField,
|
|
74
|
+
MJLinkField], imports: [CommonModule,
|
|
67
75
|
FormsModule,
|
|
68
76
|
MJTabStripModule,
|
|
69
77
|
RecordChangesModule,
|
|
@@ -72,8 +80,9 @@ BaseFormsModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonMo
|
|
|
72
80
|
DateInputsModule,
|
|
73
81
|
DropDownsModule,
|
|
74
82
|
LinkDirectivesModule,
|
|
75
|
-
AskSkipModule,
|
|
76
83
|
DialogsModule,
|
|
77
|
-
IndicatorsModule
|
|
78
|
-
|
|
79
|
-
|
|
84
|
+
IndicatorsModule,
|
|
85
|
+
ContainerDirectivesModule,
|
|
86
|
+
MemberJunctionSharedModule, i1.MarkdownModule], exports: [SectionLoaderComponent,
|
|
87
|
+
MJFormField,
|
|
88
|
+
MJLinkField] }); })();
|
package/dist/public-api.d.ts
CHANGED
|
@@ -3,6 +3,6 @@ export * from './lib/base-record-component';
|
|
|
3
3
|
export * from './lib/base-form-section-component';
|
|
4
4
|
export * from './lib/base-form-component';
|
|
5
5
|
export * from './lib/base-field-component';
|
|
6
|
+
export * from './lib/link-field.component';
|
|
6
7
|
export * from './lib/section-loader-component';
|
|
7
|
-
export * from './lib/form-toolbar';
|
|
8
8
|
//# sourceMappingURL=public-api.d.ts.map
|
package/dist/public-api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,
|
|
1
|
+
{"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC"}
|
package/dist/public-api.js
CHANGED
|
@@ -6,5 +6,5 @@ export * from './lib/base-record-component';
|
|
|
6
6
|
export * from './lib/base-form-section-component';
|
|
7
7
|
export * from './lib/base-form-component';
|
|
8
8
|
export * from './lib/base-field-component';
|
|
9
|
+
export * from './lib/link-field.component';
|
|
9
10
|
export * from './lib/section-loader-component';
|
|
10
|
-
export * from './lib/form-toolbar';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ng-base-forms",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "MemberJunction: Angular Base Form Components",
|
|
5
5
|
"main": "./dist/public-api.js",
|
|
6
6
|
"typings": "./dist/public-api.d.ts",
|
|
@@ -25,17 +25,20 @@
|
|
|
25
25
|
"@angular/router": "~17.2.2"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@memberjunction/global": "~1.4.
|
|
29
|
-
"@memberjunction/core": "~1.4.
|
|
30
|
-
"@memberjunction/ng-
|
|
31
|
-
"@memberjunction/ng-
|
|
32
|
-
"@memberjunction/ng-
|
|
33
|
-
"@memberjunction/ng-
|
|
28
|
+
"@memberjunction/global": "~1.4.1",
|
|
29
|
+
"@memberjunction/core": "~1.4.1",
|
|
30
|
+
"@memberjunction/ng-shared": "~1.4.1",
|
|
31
|
+
"@memberjunction/ng-tabstrip": "~1.4.1",
|
|
32
|
+
"@memberjunction/ng-link-directives": "~1.4.1",
|
|
33
|
+
"@memberjunction/ng-container-directives": "~1.4.1",
|
|
34
|
+
"@memberjunction/ng-record-changes": "~1.4.1",
|
|
34
35
|
"@progress/kendo-angular-buttons": "~15.1.0",
|
|
35
36
|
"@progress/kendo-angular-dropdowns": "~15.1.0",
|
|
36
37
|
"@progress/kendo-angular-inputs": "~15.1.0",
|
|
37
38
|
"@progress/kendo-angular-dateinputs": "~15.1.0",
|
|
38
39
|
"@progress/kendo-angular-dialog": "~15.1.0",
|
|
40
|
+
"ngx-markdown": "^17.1.1",
|
|
41
|
+
"rxjs": "^7.8.1",
|
|
39
42
|
"tslib": "^2.3.0"
|
|
40
43
|
},
|
|
41
44
|
"sideEffects": false
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import { BaseFormComponent } from './base-form-component';
|
|
3
|
-
import { BaseEntity, CompositeKey } from '@memberjunction/core';
|
|
4
|
-
import { Router } from '@angular/router';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class FormToolbarComponent implements OnInit {
|
|
7
|
-
private router;
|
|
8
|
-
ShowSkipChatButton: boolean;
|
|
9
|
-
form: BaseFormComponent;
|
|
10
|
-
showLoader: boolean;
|
|
11
|
-
showCreateDialog: boolean;
|
|
12
|
-
showDeleteDialog: boolean;
|
|
13
|
-
SkipChatVisible: boolean;
|
|
14
|
-
createNewDialogTitle: string;
|
|
15
|
-
newRecord: BaseEntity;
|
|
16
|
-
get LinkedEntityCompositeKey(): CompositeKey;
|
|
17
|
-
constructor(router: Router);
|
|
18
|
-
ngOnInit(): Promise<void>;
|
|
19
|
-
saveExistingRecord(event: MouseEvent): void;
|
|
20
|
-
ShowSkipChat(): void;
|
|
21
|
-
toggleCreateDialog(show: boolean): void;
|
|
22
|
-
toggleDeleteDialog(show: boolean): void;
|
|
23
|
-
deleteRecord(): Promise<void>;
|
|
24
|
-
createNewRecord(): Promise<void>;
|
|
25
|
-
saveNewRecord(): Promise<void>;
|
|
26
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FormToolbarComponent, never>;
|
|
27
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FormToolbarComponent, "mj-form-toolbar", never, { "ShowSkipChatButton": { "alias": "ShowSkipChatButton"; "required": false; }; "form": { "alias": "form"; "required": false; }; }, {}, never, never, false, never>;
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=form-toolbar.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form-toolbar.d.ts","sourceRoot":"","sources":["../../src/lib/form-toolbar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,MAAM,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,YAAY,EAA8B,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;;AAGzC,qBA+Ha,oBAAqB,YAAW,MAAM;IAe5B,OAAO,CAAC,MAAM;IAdxB,kBAAkB,EAAE,OAAO,CAAQ;IACnC,IAAI,EAAG,iBAAiB,CAAC;IAE3B,UAAU,EAAE,OAAO,CAAS;IAC5B,gBAAgB,EAAE,OAAO,CAAS;IAClC,gBAAgB,EAAE,OAAO,CAAS;IAClC,eAAe,EAAE,OAAO,CAAS;IACjC,oBAAoB,EAAE,MAAM,CAAuB;IACnD,SAAS,EAAG,UAAU,CAAC;IAE9B,IAAW,wBAAwB,IAAI,YAAY,CAElD;gBAE0B,MAAM,EAAE,MAAM;IAG5B,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAO/B,kBAAkB,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAS3C,YAAY,IAAI,IAAI;IAKpB,kBAAkB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IAIvC,kBAAkB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IAIjC,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAmB7B,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;IAMhC,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;yCAxElC,oBAAoB;2CAApB,oBAAoB;CAsFhC"}
|
package/dist/lib/form-toolbar.js
DELETED
|
@@ -1,424 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { Component, Input } from '@angular/core';
|
|
11
|
-
import { SharedService } from '@memberjunction/ng-shared';
|
|
12
|
-
import { Metadata } from '@memberjunction/core';
|
|
13
|
-
import * as i0 from "@angular/core";
|
|
14
|
-
import * as i1 from "@angular/router";
|
|
15
|
-
import * as i2 from "@angular/common";
|
|
16
|
-
import * as i3 from "@memberjunction/ng-record-changes";
|
|
17
|
-
import * as i4 from "@progress/kendo-angular-buttons";
|
|
18
|
-
import * as i5 from "@memberjunction/ng-ask-skip";
|
|
19
|
-
import * as i6 from "@progress/kendo-angular-dialog";
|
|
20
|
-
import * as i7 from "@progress/kendo-angular-indicators";
|
|
21
|
-
import * as i8 from "./section-loader-component";
|
|
22
|
-
function FormToolbarComponent_Conditional_1_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
23
|
-
const _r13 = i0.ɵɵgetCurrentView();
|
|
24
|
-
i0.ɵɵelementStart(0, "button", 10);
|
|
25
|
-
i0.ɵɵlistener("click", function FormToolbarComponent_Conditional_1_Conditional_0_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r13); const ctx_r12 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r12.toggleCreateDialog(true)); });
|
|
26
|
-
i0.ɵɵelement(1, "span", 11);
|
|
27
|
-
i0.ɵɵelementStart(2, "span", 12);
|
|
28
|
-
i0.ɵɵtext(3, "Create");
|
|
29
|
-
i0.ɵɵelementEnd()();
|
|
30
|
-
} }
|
|
31
|
-
function FormToolbarComponent_Conditional_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
32
|
-
const _r15 = i0.ɵɵgetCurrentView();
|
|
33
|
-
i0.ɵɵelementStart(0, "button", 13);
|
|
34
|
-
i0.ɵɵlistener("click", function FormToolbarComponent_Conditional_1_Conditional_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r15); const ctx_r14 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r14.toggleDeleteDialog(true)); });
|
|
35
|
-
i0.ɵɵelement(1, "span", 14);
|
|
36
|
-
i0.ɵɵelementStart(2, "span", 12);
|
|
37
|
-
i0.ɵɵtext(3, "Delete");
|
|
38
|
-
i0.ɵɵelementEnd()();
|
|
39
|
-
} }
|
|
40
|
-
function FormToolbarComponent_Conditional_1_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
41
|
-
const _r17 = i0.ɵɵgetCurrentView();
|
|
42
|
-
i0.ɵɵelementStart(0, "button", 15);
|
|
43
|
-
i0.ɵɵlistener("click", function FormToolbarComponent_Conditional_1_Conditional_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r17); const ctx_r16 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r16.form.StartEditMode()); });
|
|
44
|
-
i0.ɵɵelement(1, "span", 16);
|
|
45
|
-
i0.ɵɵelementStart(2, "span", 12);
|
|
46
|
-
i0.ɵɵtext(3, "Edit");
|
|
47
|
-
i0.ɵɵelementEnd()();
|
|
48
|
-
} }
|
|
49
|
-
function FormToolbarComponent_Conditional_1_Conditional_3_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
50
|
-
const _r21 = i0.ɵɵgetCurrentView();
|
|
51
|
-
i0.ɵɵelementStart(0, "button", 18);
|
|
52
|
-
i0.ɵɵlistener("click", function FormToolbarComponent_Conditional_1_Conditional_3_Conditional_0_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r21); const ctx_r20 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r20.form.RemoveFavorite()); });
|
|
53
|
-
i0.ɵɵelement(1, "span", 19);
|
|
54
|
-
i0.ɵɵelementEnd();
|
|
55
|
-
} }
|
|
56
|
-
function FormToolbarComponent_Conditional_1_Conditional_3_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
57
|
-
const _r23 = i0.ɵɵgetCurrentView();
|
|
58
|
-
i0.ɵɵelementStart(0, "button", 20);
|
|
59
|
-
i0.ɵɵlistener("click", function FormToolbarComponent_Conditional_1_Conditional_3_Conditional_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r23); const ctx_r22 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r22.form.MakeFavorite()); });
|
|
60
|
-
i0.ɵɵelement(1, "span", 21);
|
|
61
|
-
i0.ɵɵelementEnd();
|
|
62
|
-
} }
|
|
63
|
-
function FormToolbarComponent_Conditional_1_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
64
|
-
i0.ɵɵtemplate(0, FormToolbarComponent_Conditional_1_Conditional_3_Conditional_0_Template, 2, 0, "button", 17)(1, FormToolbarComponent_Conditional_1_Conditional_3_Conditional_1_Template, 2, 0);
|
|
65
|
-
} if (rf & 2) {
|
|
66
|
-
const ctx_r11 = i0.ɵɵnextContext(2);
|
|
67
|
-
i0.ɵɵconditional(0, ctx_r11.form.IsFavorite ? 0 : 1);
|
|
68
|
-
} }
|
|
69
|
-
function FormToolbarComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
70
|
-
i0.ɵɵtemplate(0, FormToolbarComponent_Conditional_1_Conditional_0_Template, 4, 0, "button", 7)(1, FormToolbarComponent_Conditional_1_Conditional_1_Template, 4, 0, "button", 8)(2, FormToolbarComponent_Conditional_1_Conditional_2_Template, 4, 0, "button", 9)(3, FormToolbarComponent_Conditional_1_Conditional_3_Template, 2, 1);
|
|
71
|
-
} if (rf & 2) {
|
|
72
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
73
|
-
i0.ɵɵconditional(0, ctx_r0.form.UserCanCreate ? 0 : -1);
|
|
74
|
-
i0.ɵɵadvance();
|
|
75
|
-
i0.ɵɵconditional(1, ctx_r0.form.UserCanDelete ? 1 : -1);
|
|
76
|
-
i0.ɵɵadvance();
|
|
77
|
-
i0.ɵɵconditional(2, ctx_r0.form.UserCanEdit ? 2 : -1);
|
|
78
|
-
i0.ɵɵadvance();
|
|
79
|
-
i0.ɵɵconditional(3, ctx_r0.form.FavoriteInitDone ? 3 : -1);
|
|
80
|
-
} }
|
|
81
|
-
function FormToolbarComponent_Conditional_2_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
82
|
-
const _r26 = i0.ɵɵgetCurrentView();
|
|
83
|
-
i0.ɵɵelementStart(0, "button", 27);
|
|
84
|
-
i0.ɵɵlistener("click", function FormToolbarComponent_Conditional_2_Conditional_8_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r26); const ctx_r25 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r25.form.ShowChanges()); });
|
|
85
|
-
i0.ɵɵelement(1, "span", 28);
|
|
86
|
-
i0.ɵɵelementStart(2, "span", 12);
|
|
87
|
-
i0.ɵɵtext(3, "Changes");
|
|
88
|
-
i0.ɵɵelementEnd()();
|
|
89
|
-
} }
|
|
90
|
-
function FormToolbarComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
91
|
-
const _r28 = i0.ɵɵgetCurrentView();
|
|
92
|
-
i0.ɵɵelementStart(0, "button", 22);
|
|
93
|
-
i0.ɵɵlistener("mouseup", function FormToolbarComponent_Conditional_2_Template_button_mouseup_0_listener($event) { i0.ɵɵrestoreView(_r28); const ctx_r27 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r27.saveExistingRecord($event)); });
|
|
94
|
-
i0.ɵɵelement(1, "span", 23);
|
|
95
|
-
i0.ɵɵelementStart(2, "span", 12);
|
|
96
|
-
i0.ɵɵtext(3, "Save");
|
|
97
|
-
i0.ɵɵelementEnd()();
|
|
98
|
-
i0.ɵɵelementStart(4, "button", 24);
|
|
99
|
-
i0.ɵɵlistener("click", function FormToolbarComponent_Conditional_2_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r28); const ctx_r29 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r29.form.CancelEdit()); });
|
|
100
|
-
i0.ɵɵelement(5, "span", 25);
|
|
101
|
-
i0.ɵɵelementStart(6, "span", 12);
|
|
102
|
-
i0.ɵɵtext(7, "Cancel");
|
|
103
|
-
i0.ɵɵelementEnd()();
|
|
104
|
-
i0.ɵɵtemplate(8, FormToolbarComponent_Conditional_2_Conditional_8_Template, 4, 0, "button", 26);
|
|
105
|
-
} if (rf & 2) {
|
|
106
|
-
const ctx_r1 = i0.ɵɵnextContext();
|
|
107
|
-
i0.ɵɵadvance(8);
|
|
108
|
-
i0.ɵɵconditional(8, ctx_r1.form.record.Dirty ? 8 : -1);
|
|
109
|
-
} }
|
|
110
|
-
function FormToolbarComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
111
|
-
const _r31 = i0.ɵɵgetCurrentView();
|
|
112
|
-
i0.ɵɵelementStart(0, "button", 29);
|
|
113
|
-
i0.ɵɵlistener("click", function FormToolbarComponent_Conditional_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r31); const ctx_r30 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r30.form.handleHistoryDialog()); });
|
|
114
|
-
i0.ɵɵelement(1, "span", 30);
|
|
115
|
-
i0.ɵɵelementStart(2, "span", 12);
|
|
116
|
-
i0.ɵɵtext(3, "History");
|
|
117
|
-
i0.ɵɵelementEnd()();
|
|
118
|
-
} }
|
|
119
|
-
function FormToolbarComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
120
|
-
const _r33 = i0.ɵɵgetCurrentView();
|
|
121
|
-
i0.ɵɵelementStart(0, "button", 31);
|
|
122
|
-
i0.ɵɵlistener("click", function FormToolbarComponent_Conditional_4_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r33); const ctx_r32 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r32.ShowSkipChat()); });
|
|
123
|
-
i0.ɵɵelement(1, "span", 32);
|
|
124
|
-
i0.ɵɵelementEnd();
|
|
125
|
-
} }
|
|
126
|
-
function FormToolbarComponent_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
127
|
-
const _r36 = i0.ɵɵgetCurrentView();
|
|
128
|
-
i0.ɵɵelementStart(0, "mj-skip-chat-with-record-window", 33, 34);
|
|
129
|
-
i0.ɵɵlistener("WindowClosed", function FormToolbarComponent_Conditional_5_Template_mj_skip_chat_with_record_window_WindowClosed_0_listener() { i0.ɵɵrestoreView(_r36); const ctx_r35 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r35.ShowSkipChat()); });
|
|
130
|
-
i0.ɵɵelementEnd();
|
|
131
|
-
} if (rf & 2) {
|
|
132
|
-
const ctx_r4 = i0.ɵɵnextContext();
|
|
133
|
-
i0.ɵɵproperty("LinkedEntityID", ctx_r4.form.EntityInfo.ID)("LinkedEntityCompositeKey", ctx_r4.LinkedEntityCompositeKey)("WindowOpened", ctx_r4.SkipChatVisible);
|
|
134
|
-
} }
|
|
135
|
-
function FormToolbarComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
136
|
-
const _r38 = i0.ɵɵgetCurrentView();
|
|
137
|
-
i0.ɵɵelementStart(0, "mj-record-changes", 35);
|
|
138
|
-
i0.ɵɵlistener("dialogClosed", function FormToolbarComponent_Conditional_6_Template_mj_record_changes_dialogClosed_0_listener() { i0.ɵɵrestoreView(_r38); const ctx_r37 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r37.form.handleHistoryDialog()); });
|
|
139
|
-
i0.ɵɵelementEnd();
|
|
140
|
-
} if (rf & 2) {
|
|
141
|
-
const ctx_r5 = i0.ɵɵnextContext();
|
|
142
|
-
i0.ɵɵproperty("record", ctx_r5.form.record);
|
|
143
|
-
} }
|
|
144
|
-
function FormToolbarComponent_kendo_dialog_7_Template(rf, ctx) { if (rf & 1) {
|
|
145
|
-
const _r40 = i0.ɵɵgetCurrentView();
|
|
146
|
-
i0.ɵɵelementStart(0, "kendo-dialog", 36);
|
|
147
|
-
i0.ɵɵlistener("close", function FormToolbarComponent_kendo_dialog_7_Template_kendo_dialog_close_0_listener() { i0.ɵɵrestoreView(_r40); const ctx_r39 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r39.toggleDeleteDialog(false)); });
|
|
148
|
-
i0.ɵɵelementStart(1, "p", 37);
|
|
149
|
-
i0.ɵɵtext(2, " Are you sure you want to delete this record? ");
|
|
150
|
-
i0.ɵɵelementEnd();
|
|
151
|
-
i0.ɵɵelementStart(3, "kendo-dialog-actions", 38)(4, "button", 39);
|
|
152
|
-
i0.ɵɵlistener("click", function FormToolbarComponent_kendo_dialog_7_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r40); const ctx_r41 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r41.deleteRecord()); });
|
|
153
|
-
i0.ɵɵtext(5, " Yes, Delete ");
|
|
154
|
-
i0.ɵɵelementEnd();
|
|
155
|
-
i0.ɵɵelementStart(6, "button", 40);
|
|
156
|
-
i0.ɵɵlistener("click", function FormToolbarComponent_kendo_dialog_7_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r40); const ctx_r42 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r42.toggleDeleteDialog(false)); });
|
|
157
|
-
i0.ɵɵtext(7, " No, Cancel ");
|
|
158
|
-
i0.ɵɵelementEnd()()();
|
|
159
|
-
} if (rf & 2) {
|
|
160
|
-
i0.ɵɵproperty("minWidth", 450)("width", 650);
|
|
161
|
-
} }
|
|
162
|
-
function FormToolbarComponent_kendo_dialog_8_Conditional_1_kendo_loader_0_Template(rf, ctx) { if (rf & 1) {
|
|
163
|
-
i0.ɵɵelement(0, "kendo-loader", 42);
|
|
164
|
-
} }
|
|
165
|
-
function FormToolbarComponent_kendo_dialog_8_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
166
|
-
i0.ɵɵtemplate(0, FormToolbarComponent_kendo_dialog_8_Conditional_1_kendo_loader_0_Template, 1, 0, "kendo-loader", 43);
|
|
167
|
-
} if (rf & 2) {
|
|
168
|
-
const ctx_r43 = i0.ɵɵnextContext(2);
|
|
169
|
-
i0.ɵɵproperty("ngIf", ctx_r43.showLoader);
|
|
170
|
-
} }
|
|
171
|
-
function FormToolbarComponent_kendo_dialog_8_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
172
|
-
i0.ɵɵelement(0, "mj-form-section", 44);
|
|
173
|
-
} if (rf & 2) {
|
|
174
|
-
const ctx_r44 = i0.ɵɵnextContext(2);
|
|
175
|
-
i0.ɵɵproperty("Entity", ctx_r44.form.record.EntityInfo.Name)("record", ctx_r44.newRecord)("EditMode", true);
|
|
176
|
-
} }
|
|
177
|
-
function FormToolbarComponent_kendo_dialog_8_Template(rf, ctx) { if (rf & 1) {
|
|
178
|
-
const _r47 = i0.ɵɵgetCurrentView();
|
|
179
|
-
i0.ɵɵelementStart(0, "kendo-dialog", 41);
|
|
180
|
-
i0.ɵɵlistener("close", function FormToolbarComponent_kendo_dialog_8_Template_kendo_dialog_close_0_listener() { i0.ɵɵrestoreView(_r47); const ctx_r46 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r46.toggleCreateDialog(false)); });
|
|
181
|
-
i0.ɵɵtemplate(1, FormToolbarComponent_kendo_dialog_8_Conditional_1_Template, 1, 1, "kendo-loader", 42)(2, FormToolbarComponent_kendo_dialog_8_Conditional_2_Template, 1, 3);
|
|
182
|
-
i0.ɵɵelementStart(3, "kendo-dialog-actions", 38)(4, "button", 39);
|
|
183
|
-
i0.ɵɵlistener("click", function FormToolbarComponent_kendo_dialog_8_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r47); const ctx_r48 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r48.saveNewRecord()); });
|
|
184
|
-
i0.ɵɵtext(5, " Create ");
|
|
185
|
-
i0.ɵɵelementEnd();
|
|
186
|
-
i0.ɵɵelementStart(6, "button", 40);
|
|
187
|
-
i0.ɵɵlistener("click", function FormToolbarComponent_kendo_dialog_8_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r47); const ctx_r49 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r49.toggleCreateDialog(false)); });
|
|
188
|
-
i0.ɵɵtext(7, " Cancel ");
|
|
189
|
-
i0.ɵɵelementEnd()()();
|
|
190
|
-
} if (rf & 2) {
|
|
191
|
-
const ctx_r7 = i0.ɵɵnextContext();
|
|
192
|
-
i0.ɵɵproperty("minWidth", 750)("minHeight", 500)("maxHeight", 800)("title", ctx_r7.createNewDialogTitle);
|
|
193
|
-
i0.ɵɵadvance();
|
|
194
|
-
i0.ɵɵconditional(1, ctx_r7.showLoader ? 1 : 2);
|
|
195
|
-
} }
|
|
196
|
-
export class FormToolbarComponent {
|
|
197
|
-
get LinkedEntityCompositeKey() {
|
|
198
|
-
return this.form.record.CompositeKey;
|
|
199
|
-
}
|
|
200
|
-
constructor(router) {
|
|
201
|
-
this.router = router;
|
|
202
|
-
this.ShowSkipChatButton = true;
|
|
203
|
-
this.showLoader = false;
|
|
204
|
-
this.showCreateDialog = false;
|
|
205
|
-
this.showDeleteDialog = false;
|
|
206
|
-
this.SkipChatVisible = false;
|
|
207
|
-
this.createNewDialogTitle = 'Create New Record';
|
|
208
|
-
}
|
|
209
|
-
ngOnInit() {
|
|
210
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
211
|
-
if (this.form && this.form.record) {
|
|
212
|
-
this.createNewDialogTitle = `Create New ${this.form.record.EntityInfo.Name} Record`;
|
|
213
|
-
yield this.createNewRecord();
|
|
214
|
-
}
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
saveExistingRecord(event) {
|
|
218
|
-
// Ensure the button takes focus
|
|
219
|
-
const button = event.target;
|
|
220
|
-
button.focus();
|
|
221
|
-
// Proceed to call your save record function
|
|
222
|
-
this.form.SaveRecord(true);
|
|
223
|
-
}
|
|
224
|
-
ShowSkipChat() {
|
|
225
|
-
this.SkipChatVisible = !this.SkipChatVisible;
|
|
226
|
-
SharedService.Instance.InvokeManualResize();
|
|
227
|
-
}
|
|
228
|
-
toggleCreateDialog(show) {
|
|
229
|
-
this.showCreateDialog = show;
|
|
230
|
-
}
|
|
231
|
-
toggleDeleteDialog(show) {
|
|
232
|
-
this.showDeleteDialog = show;
|
|
233
|
-
}
|
|
234
|
-
deleteRecord() {
|
|
235
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
236
|
-
this.toggleDeleteDialog(false);
|
|
237
|
-
let dependencies = yield this.form.GetRecordDependencies();
|
|
238
|
-
if (dependencies.length > 0) {
|
|
239
|
-
SharedService.Instance.CreateSimpleNotification(`This record cannot be deleted because it is being used by ${dependencies.length} other records.`, 'error', 2000);
|
|
240
|
-
return;
|
|
241
|
-
}
|
|
242
|
-
console.log(this.form.record.CompositeKey);
|
|
243
|
-
const deleteResult = yield this.form.record.Delete();
|
|
244
|
-
if (deleteResult) {
|
|
245
|
-
SharedService.Instance.CreateSimpleNotification('Record deleted succesfully', 'success', 2000);
|
|
246
|
-
this.router.navigate(['/']);
|
|
247
|
-
}
|
|
248
|
-
else {
|
|
249
|
-
SharedService.Instance.CreateSimpleNotification('Error deleting record', 'error', 2000);
|
|
250
|
-
}
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
createNewRecord() {
|
|
254
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
255
|
-
const md = new Metadata();
|
|
256
|
-
this.newRecord = yield md.GetEntityObject(this.form.record.EntityInfo.Name);
|
|
257
|
-
this.newRecord.NewRecord();
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
saveNewRecord() {
|
|
261
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
262
|
-
console.log('Create new record button pressed');
|
|
263
|
-
this.showLoader = true;
|
|
264
|
-
let saveResult = yield this.newRecord.Save();
|
|
265
|
-
if (saveResult) {
|
|
266
|
-
this.toggleCreateDialog(false);
|
|
267
|
-
SharedService.Instance.CreateSimpleNotification(`Successfully created new ${this.form.record.EntityInfo.Name} record`, 'success', 1000);
|
|
268
|
-
this.router.navigate(['resource', 'record', this.newRecord.CompositeKey.ToURLSegment()], { queryParams: { Entity: this.newRecord.EntityInfo.Name } });
|
|
269
|
-
}
|
|
270
|
-
else {
|
|
271
|
-
SharedService.Instance.CreateSimpleNotification(`Failed to create new ${this.form.record.EntityInfo.Name} record`, 'error', 1000);
|
|
272
|
-
}
|
|
273
|
-
this.showLoader = false;
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
FormToolbarComponent.ɵfac = function FormToolbarComponent_Factory(t) { return new (t || FormToolbarComponent)(i0.ɵɵdirectiveInject(i1.Router)); };
|
|
278
|
-
FormToolbarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FormToolbarComponent, selectors: [["mj-form-toolbar"]], inputs: { ShowSkipChatButton: "ShowSkipChatButton", form: "form" }, decls: 9, vars: 7, consts: [[1, "toolbar-container"], ["kendoButton", "", "title", "Show History"], ["kendoButton", "", "title", "Discuss this record with Skip"], [3, "LinkedEntityID", "LinkedEntityCompositeKey", "WindowOpened"], [3, "record"], ["class", "dialog-wrapper", "title", "Confirm", 3, "minWidth", "width", "close", 4, "ngIf"], ["class", "dialog-wrapper", 3, "minWidth", "minHeight", "maxHeight", "title", "close", 4, "ngIf"], ["kendoButton", "", "title", "Create New Record"], ["kendoButton", "", "title", "Delete this Record"], ["kendoButton", "", "title", "Edit this Record"], ["kendoButton", "", "title", "Create New Record", 3, "click"], [1, "fa-solid", "fa-plus"], [1, "button-text"], ["kendoButton", "", "title", "Delete this Record", 3, "click"], [1, "fa-regular", "fa-trash-can"], ["kendoButton", "", "title", "Edit this Record", 3, "click"], [1, "fa-solid", "fa-pen-to-square"], ["kendoButton", "", "title", "Remove Favorite"], ["kendoButton", "", "title", "Remove Favorite", 3, "click"], [1, "fa-solid", "fa-star"], ["kendoButton", "", "title", "Make Favorite", 3, "click"], [1, "fa-regular", "fa-star"], ["kendoButton", "", "title", "Save Record", 3, "mouseup"], [1, "fa-solid", "fa-floppy-disk"], ["kendoButton", "", "title", "Cancel Edit", 3, "click"], [1, "fa-solid", "fa-rotate-left"], ["kendoButton", "", "title", "Fields you have changed"], ["kendoButton", "", "title", "Fields you have changed", 3, "click"], [1, "fa-solid", "fa-clipboard-list"], ["kendoButton", "", "title", "Show History", 3, "click"], [1, "fa-solid", "fa-business-time"], ["kendoButton", "", "title", "Discuss this record with Skip", 3, "click"], [1, "fa-regular", "fa-comment-dots"], [3, "LinkedEntityID", "LinkedEntityCompositeKey", "WindowOpened", "WindowClosed"], ["mjChat", ""], [3, "record", "dialogClosed"], ["title", "Confirm", 1, "dialog-wrapper", 3, "minWidth", "width", "close"], [1, "k-m-7.5", "k-text-center"], [1, "popup-actions-btn"], ["kendoButton", "", "themeColor", "info", 1, "cancel-btn", 3, "click"], ["kendoButton", "", "fillMode", "outline", "themeColor", "info", 1, "yes-btn", 3, "click"], [1, "dialog-wrapper", 3, "minWidth", "minHeight", "maxHeight", "title", "close"], ["type", "converging-spinner"], ["type", "converging-spinner", 4, "ngIf"], ["Section", "details", 3, "Entity", "record", "EditMode"]], template: function FormToolbarComponent_Template(rf, ctx) { if (rf & 1) {
|
|
279
|
-
i0.ɵɵelementStart(0, "div", 0);
|
|
280
|
-
i0.ɵɵtemplate(1, FormToolbarComponent_Conditional_1_Template, 4, 4)(2, FormToolbarComponent_Conditional_2_Template, 9, 1)(3, FormToolbarComponent_Conditional_3_Template, 4, 0, "button", 1)(4, FormToolbarComponent_Conditional_4_Template, 2, 0, "button", 2)(5, FormToolbarComponent_Conditional_5_Template, 2, 3, "mj-skip-chat-with-record-window", 3)(6, FormToolbarComponent_Conditional_6_Template, 1, 1, "mj-record-changes", 4)(7, FormToolbarComponent_kendo_dialog_7_Template, 8, 2, "kendo-dialog", 5)(8, FormToolbarComponent_kendo_dialog_8_Template, 8, 5, "kendo-dialog", 6);
|
|
281
|
-
i0.ɵɵelementEnd();
|
|
282
|
-
} if (rf & 2) {
|
|
283
|
-
i0.ɵɵadvance();
|
|
284
|
-
i0.ɵɵconditional(1, !ctx.form.EditMode ? 1 : 2);
|
|
285
|
-
i0.ɵɵadvance(2);
|
|
286
|
-
i0.ɵɵconditional(3, (ctx.form.EntityInfo == null ? null : ctx.form.EntityInfo.TrackRecordChanges) ? 3 : -1);
|
|
287
|
-
i0.ɵɵadvance();
|
|
288
|
-
i0.ɵɵconditional(4, ctx.ShowSkipChatButton ? 4 : -1);
|
|
289
|
-
i0.ɵɵadvance();
|
|
290
|
-
i0.ɵɵconditional(5, ctx.form.EntityInfo ? 5 : -1);
|
|
291
|
-
i0.ɵɵadvance();
|
|
292
|
-
i0.ɵɵconditional(6, ctx.form.isHistoryDialogOpen ? 6 : -1);
|
|
293
|
-
i0.ɵɵadvance();
|
|
294
|
-
i0.ɵɵproperty("ngIf", ctx.showDeleteDialog);
|
|
295
|
-
i0.ɵɵadvance();
|
|
296
|
-
i0.ɵɵproperty("ngIf", ctx.showCreateDialog);
|
|
297
|
-
} }, dependencies: [i2.NgIf, i3.RecordChangesComponent, i4.ButtonComponent, i5.SkipChatWithRecordWindowComponent, i6.DialogComponent, i6.DialogActionsComponent, i7.LoaderComponent, i8.SectionLoaderComponent], styles: ["button[_ngcontent-%COMP%] { margin-right: 10px; }", ".button-text[_ngcontent-%COMP%] { margin-left: 7px; }", ".toolbar-container[_ngcontent-%COMP%] { border-bottom: solid 1px lightgray; padding-bottom: 10px; margin-bottom: 5px; }"] });
|
|
298
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FormToolbarComponent, [{
|
|
299
|
-
type: Component,
|
|
300
|
-
args: [{ selector: 'mj-form-toolbar', template: `
|
|
301
|
-
<div class="toolbar-container">
|
|
302
|
-
@if (!form.EditMode) {
|
|
303
|
-
@if(form.UserCanCreate){
|
|
304
|
-
<button kendoButton (click)="toggleCreateDialog(true)" title="Create New Record">
|
|
305
|
-
<span class="fa-solid fa-plus"></span>
|
|
306
|
-
<span class="button-text">Create</span>
|
|
307
|
-
</button>
|
|
308
|
-
}
|
|
309
|
-
@if(form.UserCanDelete){
|
|
310
|
-
<button kendoButton (click)="toggleDeleteDialog(true)" title="Delete this Record">
|
|
311
|
-
<span class="fa-regular fa-trash-can"></span>
|
|
312
|
-
<span class="button-text">Delete</span>
|
|
313
|
-
</button>
|
|
314
|
-
}
|
|
315
|
-
@if (form.UserCanEdit) {
|
|
316
|
-
<button kendoButton (click)="form.StartEditMode()" title="Edit this Record">
|
|
317
|
-
<span class="fa-solid fa-pen-to-square"></span>
|
|
318
|
-
<span class="button-text">Edit</span>
|
|
319
|
-
</button>
|
|
320
|
-
}
|
|
321
|
-
@if (form.FavoriteInitDone) {
|
|
322
|
-
@if (form.IsFavorite) {
|
|
323
|
-
<button kendoButton (click)="form.RemoveFavorite()" title="Remove Favorite">
|
|
324
|
-
<span class="fa-solid fa-star"></span>
|
|
325
|
-
</button>
|
|
326
|
-
}
|
|
327
|
-
@else {
|
|
328
|
-
<button kendoButton (click)="form.MakeFavorite()" title="Make Favorite">
|
|
329
|
-
<span class="fa-regular fa-star"></span>
|
|
330
|
-
</button>
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
@else {
|
|
335
|
-
<button kendoButton (mouseup)="saveExistingRecord($event)" title="Save Record">
|
|
336
|
-
<span class="fa-solid fa-floppy-disk"></span>
|
|
337
|
-
<span class="button-text">Save</span>
|
|
338
|
-
</button>
|
|
339
|
-
<button kendoButton (click)="form.CancelEdit()" title="Cancel Edit">
|
|
340
|
-
<span class="fa-solid fa-rotate-left"></span>
|
|
341
|
-
<span class="button-text">Cancel</span>
|
|
342
|
-
</button>
|
|
343
|
-
@if (form.record.Dirty) {
|
|
344
|
-
<button kendoButton (click)="form.ShowChanges()" title="Fields you have changed">
|
|
345
|
-
<span class="fa-solid fa-clipboard-list"></span>
|
|
346
|
-
<span class="button-text">Changes</span>
|
|
347
|
-
</button>
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
@if (form.EntityInfo?.TrackRecordChanges) {
|
|
351
|
-
<button kendoButton (click)="form.handleHistoryDialog()" title="Show History">
|
|
352
|
-
<span class="fa-solid fa-business-time"></span>
|
|
353
|
-
<span class="button-text">History</span>
|
|
354
|
-
</button>
|
|
355
|
-
}
|
|
356
|
-
@if (ShowSkipChatButton) {
|
|
357
|
-
<button kendoButton (click)="ShowSkipChat()" title="Discuss this record with Skip">
|
|
358
|
-
<span class="fa-regular fa-comment-dots"></span>
|
|
359
|
-
</button>
|
|
360
|
-
}
|
|
361
|
-
@if (form.EntityInfo) {
|
|
362
|
-
<mj-skip-chat-with-record-window
|
|
363
|
-
[LinkedEntityID]="form.EntityInfo.ID"
|
|
364
|
-
[LinkedEntityCompositeKey]="LinkedEntityCompositeKey"
|
|
365
|
-
#mjChat
|
|
366
|
-
[WindowOpened]="SkipChatVisible"
|
|
367
|
-
(WindowClosed)="ShowSkipChat()"
|
|
368
|
-
>
|
|
369
|
-
</mj-skip-chat-with-record-window>
|
|
370
|
-
}
|
|
371
|
-
@if (form.isHistoryDialogOpen) {
|
|
372
|
-
<mj-record-changes [record]="form.record" (dialogClosed)="form.handleHistoryDialog()"></mj-record-changes>
|
|
373
|
-
}
|
|
374
|
-
<kendo-dialog
|
|
375
|
-
[minWidth]="450"
|
|
376
|
-
[width]="650"
|
|
377
|
-
class="dialog-wrapper"
|
|
378
|
-
title="Confirm"
|
|
379
|
-
*ngIf="showDeleteDialog"
|
|
380
|
-
(close)="toggleDeleteDialog(false)">
|
|
381
|
-
<p class="k-m-7.5 k-text-center">
|
|
382
|
-
Are you sure you want to delete this record?
|
|
383
|
-
</p>
|
|
384
|
-
<kendo-dialog-actions class="popup-actions-btn">
|
|
385
|
-
<button class="cancel-btn" (click)="deleteRecord()" kendoButton themeColor="info">
|
|
386
|
-
Yes, Delete
|
|
387
|
-
</button>
|
|
388
|
-
<button class="yes-btn" (click)="toggleDeleteDialog(false)" kendoButton fillMode="outline" themeColor="info">
|
|
389
|
-
No, Cancel
|
|
390
|
-
</button>
|
|
391
|
-
</kendo-dialog-actions>
|
|
392
|
-
</kendo-dialog>
|
|
393
|
-
<kendo-dialog
|
|
394
|
-
[minWidth]="750"
|
|
395
|
-
[minHeight]="500"
|
|
396
|
-
[maxHeight]= 800
|
|
397
|
-
class="dialog-wrapper"
|
|
398
|
-
[title]="createNewDialogTitle"
|
|
399
|
-
*ngIf="showCreateDialog"
|
|
400
|
-
(close)="toggleCreateDialog(false)"
|
|
401
|
-
>
|
|
402
|
-
@if(showLoader){
|
|
403
|
-
<kendo-loader *ngIf="showLoader" type="converging-spinner"></kendo-loader>
|
|
404
|
-
}
|
|
405
|
-
@else{
|
|
406
|
-
<mj-form-section [Entity]="form.record.EntityInfo.Name" Section="details" [record]="newRecord" [EditMode]="true"></mj-form-section>
|
|
407
|
-
}
|
|
408
|
-
<kendo-dialog-actions class="popup-actions-btn">
|
|
409
|
-
<button class="cancel-btn" (click)="saveNewRecord()" kendoButton themeColor="info">
|
|
410
|
-
Create
|
|
411
|
-
</button>
|
|
412
|
-
<button class="yes-btn" (click)="toggleCreateDialog(false)" kendoButton fillMode="outline" themeColor="info">
|
|
413
|
-
Cancel
|
|
414
|
-
</button>
|
|
415
|
-
</kendo-dialog-actions>
|
|
416
|
-
</kendo-dialog>
|
|
417
|
-
</div>
|
|
418
|
-
`, styles: ["button { margin-right: 10px; }", ".button-text { margin-left: 7px; }", ".toolbar-container { border-bottom: solid 1px lightgray; padding-bottom: 10px; margin-bottom: 5px; }"] }]
|
|
419
|
-
}], () => [{ type: i1.Router }], { ShowSkipChatButton: [{
|
|
420
|
-
type: Input
|
|
421
|
-
}], form: [{
|
|
422
|
-
type: Input
|
|
423
|
-
}] }); })();
|
|
424
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FormToolbarComponent, { className: "FormToolbarComponent", filePath: "src/lib/form-toolbar.ts", lineNumber: 135 }); })();
|