ngx-techlify-core 11.3.7 → 11.3.8
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/bundles/ngx-techlify-core.umd.js +163 -16
- package/bundles/ngx-techlify-core.umd.js.map +1 -1
- package/bundles/ngx-techlify-core.umd.min.js +2 -2
- package/bundles/ngx-techlify-core.umd.min.js.map +1 -1
- package/esm2015/lib/email-subscription/email-subscription-type/email-subscription-type-list/email-subscription-type-list.component.js +2 -2
- package/esm2015/lib/email-subscription/email-subscription-user/email-subscription-user-list-filter/email-subscription-user-list-filter.component.js +2 -2
- package/esm2015/lib/login-history-for-user/login-history-for-user.component.js +11 -2
- package/esm2015/lib/timeline-filter/calculate-timeline.js +2 -2
- package/esm2015/lib/timeline-filter/timeline-filter.component.js +146 -16
- package/fesm2015/ngx-techlify-core.js +151 -16
- package/fesm2015/ngx-techlify-core.js.map +1 -1
- package/lib/login-history-for-user/login-history-for-user.component.d.ts +2 -0
- package/lib/timeline-filter/calculate-timeline.d.ts +5 -0
- package/lib/timeline-filter/timeline-filter.component.d.ts +47 -6
- package/ngx-techlify-core.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -2786,7 +2786,7 @@
|
|
|
2786
2786
|
}
|
|
2787
2787
|
case 4: { // This Week
|
|
2788
2788
|
var first = date.getDate() - date.getDay() + 1; // First day is the day of the month - the day of the week
|
|
2789
|
-
var last = first + 6; // last day is the first day + 6
|
|
2789
|
+
var last = first + 6; // last day is the first day + 6
|
|
2790
2790
|
data.date_from = new Date(date.setDate(first));
|
|
2791
2791
|
data.date_to = new Date(date.setDate(last));
|
|
2792
2792
|
break;
|
|
@@ -2868,8 +2868,11 @@
|
|
|
2868
2868
|
Timeline.LAST_YEAR = 11;
|
|
2869
2869
|
Timeline.ALL = 12;
|
|
2870
2870
|
|
|
2871
|
-
|
|
2872
|
-
|
|
2871
|
+
var TimelineFilterComponent_1;
|
|
2872
|
+
exports.ɵbb = TimelineFilterComponent_1 = /** @class */ (function () {
|
|
2873
|
+
function TimelineFilterComponent(formBuilder, ngControl, datePipe) {
|
|
2874
|
+
this.ngControl = ngControl;
|
|
2875
|
+
this.datePipe = datePipe;
|
|
2873
2876
|
this.timelineValue = new forms.FormControl('');
|
|
2874
2877
|
this.timelines = [
|
|
2875
2878
|
{ value: 1, viewValue: 'Custom' },
|
|
@@ -2885,12 +2888,33 @@
|
|
|
2885
2888
|
{ value: 11, viewValue: 'Last Year' },
|
|
2886
2889
|
{ value: 12, viewValue: 'All dates' },
|
|
2887
2890
|
];
|
|
2888
|
-
this.labelText = 'Select Timeline';
|
|
2889
2891
|
this.dateFrom = 'date_from';
|
|
2890
2892
|
this.dateTo = 'date_to';
|
|
2891
2893
|
this.appearance = "legacy";
|
|
2892
2894
|
this.showClearbutton = false;
|
|
2895
|
+
/**
|
|
2896
|
+
* @deprecated The form input is deprated
|
|
2897
|
+
*/
|
|
2898
|
+
this.form = null;
|
|
2899
|
+
this.labelText = 'Select Timeline';
|
|
2900
|
+
this.touchUi = true;
|
|
2901
|
+
this.selectedValueChange = new i0.EventEmitter();
|
|
2902
|
+
this.selectionChange = new i0.EventEmitter();
|
|
2903
|
+
this.onChange = function () { };
|
|
2904
|
+
this.onTouched = function () { };
|
|
2905
|
+
this.stateChanges = new rxjs.Subject();
|
|
2906
|
+
this.controlType = 'timeline-filter';
|
|
2907
|
+
this.id = "timeline-filter-" + TimelineFilterComponent_1.nextId++;
|
|
2908
|
+
this.describedBy = '';
|
|
2893
2909
|
this.showCustomDateFields = false;
|
|
2910
|
+
this._required = false;
|
|
2911
|
+
this._disabled = false;
|
|
2912
|
+
this.selectorForm = formBuilder.group({
|
|
2913
|
+
select_value: [null],
|
|
2914
|
+
});
|
|
2915
|
+
if (this.ngControl != null) {
|
|
2916
|
+
this.ngControl.valueAccessor = this;
|
|
2917
|
+
}
|
|
2894
2918
|
}
|
|
2895
2919
|
Object.defineProperty(TimelineFilterComponent.prototype, "defaultValue", {
|
|
2896
2920
|
set: function (value) {
|
|
@@ -2900,10 +2924,53 @@
|
|
|
2900
2924
|
enumerable: false,
|
|
2901
2925
|
configurable: true
|
|
2902
2926
|
});
|
|
2903
|
-
TimelineFilterComponent.prototype
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2927
|
+
Object.defineProperty(TimelineFilterComponent.prototype, "required", {
|
|
2928
|
+
get: function () { return this._required; },
|
|
2929
|
+
set: function (value) {
|
|
2930
|
+
this.selectorForm.get('select_value').setValidators(forms.Validators.required);
|
|
2931
|
+
this._required = coercion.coerceBooleanProperty(value);
|
|
2932
|
+
this.stateChanges.next();
|
|
2933
|
+
},
|
|
2934
|
+
enumerable: false,
|
|
2935
|
+
configurable: true
|
|
2936
|
+
});
|
|
2937
|
+
Object.defineProperty(TimelineFilterComponent.prototype, "disabled", {
|
|
2938
|
+
get: function () { return this._disabled; },
|
|
2939
|
+
set: function (value) {
|
|
2940
|
+
this._disabled = coercion.coerceBooleanProperty(value);
|
|
2941
|
+
this._disabled ? this.selectorForm.disable() : this.selectorForm.enable();
|
|
2942
|
+
this.stateChanges.next();
|
|
2943
|
+
},
|
|
2944
|
+
enumerable: false,
|
|
2945
|
+
configurable: true
|
|
2946
|
+
});
|
|
2947
|
+
Object.defineProperty(TimelineFilterComponent.prototype, "value", {
|
|
2948
|
+
get: function () {
|
|
2949
|
+
if (this.selectorForm.valid) {
|
|
2950
|
+
return this.selectorForm.value.select_value;
|
|
2951
|
+
}
|
|
2952
|
+
return '';
|
|
2953
|
+
},
|
|
2954
|
+
set: function (data) {
|
|
2955
|
+
this.selectorForm.patchValue({ select_value: data || '' });
|
|
2956
|
+
this._handleInput();
|
|
2957
|
+
this.stateChanges.next();
|
|
2958
|
+
},
|
|
2959
|
+
enumerable: false,
|
|
2960
|
+
configurable: true
|
|
2961
|
+
});
|
|
2962
|
+
TimelineFilterComponent.prototype.getDateRangeString = function () {
|
|
2963
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
2964
|
+
var str = "";
|
|
2965
|
+
if ((_a = this.selectedRange) === null || _a === void 0 ? void 0 : _a.show_custom_field) {
|
|
2966
|
+
if (((_b = this.selectedRange) === null || _b === void 0 ? void 0 : _b.date_from.toUTCString()) != 'Invalid Date') {
|
|
2967
|
+
str += ' - ' + this.datePipe.transform((_d = (_c = this.selectedRange) === null || _c === void 0 ? void 0 : _c.date_from) === null || _d === void 0 ? void 0 : _d.toUTCString());
|
|
2968
|
+
}
|
|
2969
|
+
if (((_e = this.selectedRange) === null || _e === void 0 ? void 0 : _e.date_to.toUTCString()) != 'Invalid Date') {
|
|
2970
|
+
str += ' - ' + this.datePipe.transform((_g = (_f = this.selectedRange) === null || _f === void 0 ? void 0 : _f.date_to) === null || _g === void 0 ? void 0 : _g.toUTCString());
|
|
2971
|
+
}
|
|
2972
|
+
}
|
|
2973
|
+
return str;
|
|
2907
2974
|
};
|
|
2908
2975
|
TimelineFilterComponent.prototype.resetFieldValue = function (field) {
|
|
2909
2976
|
this.form.get(field).setValue('');
|
|
@@ -2922,28 +2989,99 @@
|
|
|
2922
2989
|
this.showCustomDateFields = timeline.show_custom_field;
|
|
2923
2990
|
}
|
|
2924
2991
|
};
|
|
2992
|
+
TimelineFilterComponent.prototype._handleInput = function () {
|
|
2993
|
+
if (this.value == 1) {
|
|
2994
|
+
this.picker.open();
|
|
2995
|
+
return;
|
|
2996
|
+
}
|
|
2997
|
+
var range = calculateTimeline(this.value);
|
|
2998
|
+
this.selectedRange = range;
|
|
2999
|
+
this.onChange(this.value);
|
|
3000
|
+
this.selectedValueChange.emit(this.selectedValue);
|
|
3001
|
+
this.selectionChange.emit(range);
|
|
3002
|
+
};
|
|
3003
|
+
TimelineFilterComponent.prototype.dateRangeChange = function (dateRangeStart, dateRangeEnd) {
|
|
3004
|
+
var range = {
|
|
3005
|
+
date_from: new Date(dateRangeStart.value),
|
|
3006
|
+
date_to: new Date(dateRangeEnd.value),
|
|
3007
|
+
show_custom_field: true
|
|
3008
|
+
};
|
|
3009
|
+
this.selectedRange = range;
|
|
3010
|
+
this.onChange(this.value);
|
|
3011
|
+
this.selectedValueChange.emit(this.selectedValue);
|
|
3012
|
+
this.selectionChange.emit(range);
|
|
3013
|
+
};
|
|
3014
|
+
TimelineFilterComponent.prototype.onCustomDateChange = function (event) {
|
|
3015
|
+
console.log(event);
|
|
3016
|
+
};
|
|
3017
|
+
TimelineFilterComponent.prototype.setDescribedByIds = function (ids) {
|
|
3018
|
+
this.describedBy = ids.join(' ');
|
|
3019
|
+
};
|
|
3020
|
+
TimelineFilterComponent.prototype.onContainerClick = function (event) {
|
|
3021
|
+
event.stopPropagation();
|
|
3022
|
+
};
|
|
3023
|
+
TimelineFilterComponent.prototype.writeValue = function (data) {
|
|
3024
|
+
this.value = data;
|
|
3025
|
+
};
|
|
3026
|
+
TimelineFilterComponent.prototype.registerOnChange = function (fn) {
|
|
3027
|
+
this.onChange = fn;
|
|
3028
|
+
};
|
|
3029
|
+
TimelineFilterComponent.prototype.registerOnTouched = function (fn) {
|
|
3030
|
+
this.onTouched = fn;
|
|
3031
|
+
};
|
|
3032
|
+
TimelineFilterComponent.prototype.setDisabledState = function (isDisabled) {
|
|
3033
|
+
this.disabled = isDisabled;
|
|
3034
|
+
};
|
|
3035
|
+
TimelineFilterComponent.prototype.ngOnInit = function () {
|
|
3036
|
+
var _this = this;
|
|
3037
|
+
console.log(this.form);
|
|
3038
|
+
this.timelineValue.valueChanges.
|
|
3039
|
+
pipe(operators.debounceTime(100), operators.distinctUntilChanged(), untilDestroy.untilDestroyed(this)).subscribe(function (value) { return _this.changeTimeline(value); });
|
|
3040
|
+
};
|
|
3041
|
+
TimelineFilterComponent.prototype.ngOnDestroy = function () {
|
|
3042
|
+
this.stateChanges.complete();
|
|
3043
|
+
};
|
|
2925
3044
|
return TimelineFilterComponent;
|
|
2926
3045
|
}());
|
|
3046
|
+
exports.ɵbb.nextId = 0;
|
|
2927
3047
|
exports.ɵbb.decorators = [
|
|
2928
3048
|
{ type: i0.Component, args: [{
|
|
2929
3049
|
selector: 'app-timeline-filter',
|
|
2930
|
-
template: "<ng-container [formGroup]=\"form\">\n
|
|
3050
|
+
template: "<ng-container *ngIf=\"form\" [formGroup]=\"form\">\n <mat-form-field [appearance]=\"appearance\">\n <mat-label>{{labelText}}</mat-label>\n <mat-select [formControl]=\"timelineValue\">\n <mat-option *ngFor=\"let timeline of timelines\" [value]=\"timeline.value\">\n {{timeline.viewValue}}\n </mat-option>\n </mat-select>\n <button mat-button *ngIf=\"showClearbutton && timelineValue.value\" matSuffix mat-icon-button\n (click)=\"timelineValue.setValue('')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <ng-container *ngIf=\"showCustomDateFields\">\n <mat-form-field [appearance]=\"appearance\">\n <mat-label>From Date</mat-label>\n <input matInput formControlName=\"{{dateFrom}}\" [matDatepicker]=\"fromPicker\" (click)=\"fromPicker.open()\"\n placeholder=\"From Date\" readonly />\n <mat-datepicker-toggle matSuffix [for]=\"fromPicker\"></mat-datepicker-toggle>\n <mat-datepicker #fromPicker></mat-datepicker>\n <button mat-button *ngIf=\"getFieldValue(dateFrom)\" matSuffix mat-icon-button\n (click)=\"resetFieldValue(dateFrom)\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field [appearance]=\"appearance\">\n <mat-label>To Date</mat-label>\n <input matInput formControlName=\"{{dateTo}}\" [matDatepicker]=\"toPicker\" (click)=\"toPicker.open()\"\n placeholder=\"To Date\" readonly />\n <mat-datepicker-toggle matSuffix [for]=\"\"></mat-datepicker-toggle>\n <mat-datepicker #toPicker></mat-datepicker>\n <button mat-button *ngIf=\"getFieldValue(dateTo)\" matSuffix mat-icon-button\n (click)=\"resetFieldValue(dateTo)\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n </ng-container>\n</ng-container>\n<div *ngIf=\"!form\" [formGroup]=\"selectorForm\">\n <mat-select formControlName=\"select_value\" focused=\"false\" [required]=\"required\"\n autocomplete=\"off\" (selectionChange)=\"_handleInput()\">\n <mat-option *ngFor=\"let timeline of timelines\" [value]=\"timeline?.value\">\n {{ timeline?.viewValue }} {{ selectedRange?.show_custom_field && timeline?.value == 1 ? getDateRangeString() : '' }}\n </mat-option>\n </mat-select>\n <mat-date-range-input hidden (dateChange)=\"onCustomDateChange($event)\" [rangePicker]=\"picker\">\n <input matStartDate #customStartDate>\n <input matEndDate (dateChange)=\"dateRangeChange(customStartDate, customEndDate)\" #customEndDate>\n </mat-date-range-input>\n <mat-date-range-picker #picker [touchUi]=\"touchUi\"></mat-date-range-picker>\n</div>\n",
|
|
3051
|
+
providers: [
|
|
3052
|
+
{
|
|
3053
|
+
provide: formField.MatFormFieldControl,
|
|
3054
|
+
useExisting: TimelineFilterComponent_1
|
|
3055
|
+
}
|
|
3056
|
+
],
|
|
2931
3057
|
styles: [""]
|
|
2932
3058
|
},] }
|
|
2933
3059
|
];
|
|
2934
|
-
exports.ɵbb.ctorParameters = function () { return [
|
|
3060
|
+
exports.ɵbb.ctorParameters = function () { return [
|
|
3061
|
+
{ type: forms.FormBuilder },
|
|
3062
|
+
{ type: forms.NgControl, decorators: [{ type: i0.Optional }, { type: i0.Self }] },
|
|
3063
|
+
{ type: common.DatePipe }
|
|
3064
|
+
]; };
|
|
2935
3065
|
exports.ɵbb.propDecorators = {
|
|
3066
|
+
picker: [{ type: i0.ViewChild, args: ['picker',] }],
|
|
2936
3067
|
timelineValue: [{ type: i0.Input }],
|
|
2937
3068
|
timelines: [{ type: i0.Input }],
|
|
2938
|
-
labelText: [{ type: i0.Input }],
|
|
2939
3069
|
dateFrom: [{ type: i0.Input }],
|
|
2940
3070
|
dateTo: [{ type: i0.Input }],
|
|
2941
3071
|
appearance: [{ type: i0.Input }],
|
|
2942
3072
|
showClearbutton: [{ type: i0.Input }],
|
|
2943
3073
|
form: [{ type: i0.Input }],
|
|
2944
|
-
|
|
3074
|
+
labelText: [{ type: i0.Input }],
|
|
3075
|
+
selectedValue: [{ type: i0.Input }],
|
|
3076
|
+
touchUi: [{ type: i0.Input }],
|
|
3077
|
+
selectedValueChange: [{ type: i0.Output }],
|
|
3078
|
+
selectionChange: [{ type: i0.Output }],
|
|
3079
|
+
defaultValue: [{ type: i0.Input }],
|
|
3080
|
+
required: [{ type: i0.Input }],
|
|
3081
|
+
disabled: [{ type: i0.Input }],
|
|
3082
|
+
value: [{ type: i0.Input }]
|
|
2945
3083
|
};
|
|
2946
|
-
exports.ɵbb = __decorate([
|
|
3084
|
+
exports.ɵbb = TimelineFilterComponent_1 = __decorate([
|
|
2947
3085
|
untilDestroy.UntilDestroy()
|
|
2948
3086
|
], exports.ɵbb);
|
|
2949
3087
|
|
|
@@ -4050,7 +4188,7 @@
|
|
|
4050
4188
|
exports.ɵbh.decorators = [
|
|
4051
4189
|
{ type: i0.Component, args: [{
|
|
4052
4190
|
selector: 'app-email-subscription-user-list-filter',
|
|
4053
|
-
template: "<form [formGroup]=\"esUserFilterForm\" fxLayout=\"row wrap\" fxLayoutGap=\"1rem\" fxLayoutAlign=\"start center\">\n <mat-form-field class=\"ml-3\">\n <mat-label>User</mat-label>\n <app-searchable-selector formControlName=\"user_id\" apiUrl=\"api/users\" titleField=\"name\">\n </app-searchable-selector>\n <button mat-button *ngIf=\"getFieldValue('user_id')\" matSuffix mat-icon-button\n (click)=\"resetFieldValue('user_id')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field class=\"ml-3\">\n <mat-label>Email Type</mat-label>\n <app-searchable-selector formControlName=\"email_type_id\" apiUrl=\"api/email-subscription-types\">\n </app-searchable-selector>\n <button mat-button *ngIf=\"getFieldValue('
|
|
4191
|
+
template: "<form [formGroup]=\"esUserFilterForm\" fxLayout=\"row wrap\" fxLayoutGap=\"1rem\" fxLayoutAlign=\"start center\">\n <mat-form-field class=\"ml-3\">\n <mat-label>User</mat-label>\n <app-searchable-selector formControlName=\"user_id\" apiUrl=\"api/users\" titleField=\"name\">\n </app-searchable-selector>\n <button mat-button *ngIf=\"getFieldValue('user_id')\" matSuffix mat-icon-button\n (click)=\"resetFieldValue('user_id')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field class=\"ml-3\">\n <mat-label>Email Type</mat-label>\n <app-searchable-selector formControlName=\"email_type_id\" apiUrl=\"api/email-subscription-types\">\n </app-searchable-selector>\n <button mat-button *ngIf=\"getFieldValue('email_type_id')\" matSuffix mat-icon-button\n (click)=\"resetFieldValue('email_type_id')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n</form>",
|
|
4054
4192
|
styles: [""]
|
|
4055
4193
|
},] }
|
|
4056
4194
|
];
|
|
@@ -4401,7 +4539,7 @@
|
|
|
4401
4539
|
exports.ɵbj.decorators = [
|
|
4402
4540
|
{ type: i0.Component, args: [{
|
|
4403
4541
|
selector: 'app-email-subscription-type-list',
|
|
4404
|
-
template: "<div class=\"mat-typography m-4\">\n <div fxLayout=\"row wrap\" fxLayoutAlign=\"start center\">\n <mat-form-field>\n <input matInput [formControl]=\"search\" placeholder=\"Email Type\" autocomplete=\"off\" />\n <button mat-button matSuffix mat-icon-button>\n <mat-icon>search</mat-icon>\n </button>\n <button mat-button *ngIf=\"search.value\" matSuffix mat-icon-button (click)=\"search.setValue('')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n <div class=\"ml-2\">\n <button mat-raised-button color=\"primary\" type=\"button\" (click)=\"addEmailSubscriptionType()\">+ Email\n Type</button>\n </div>\n <span fxFlex></span>\n <mat-form-field appearance=\"outline\" class=\"no-padding\">\n <mat-label>Columns</mat-label>\n <mat-select [formControl]=\"displayColumns\" multiple (selectionChange)=\"columnsChange()\">\n <mat-option *ngFor=\"let column of availableDisplayColumns\" [value]=\"column.value\">{{column.name}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n\n <section>\n <div class=\"scroll-container\" infiniteScroll [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\" [scrollWindow]=\"false\">\n <table mat-table [dataSource]=\"emailSubscriptionTypeList\" matSort class=\"w-100 mt-1\" multiTemplateDataRows\n id=\"email-subscription-type-table\">\n\n <!-- Index Column -->\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef> # </th>\n <td mat-cell *matCellDef=\"let emailSubscriptionType; let i = dataIndex\"> {{ i+1 }} </td>\n </ng-container>\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header> Title </th>\n <td mat-cell *matCellDef=\"let emailSubscriptionType;\"> {{ emailSubscriptionType?.title }} </td>\n </ng-container>\n <ng-container matColumnDef=\"code\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header> Code </th>\n <td mat-cell *matCellDef=\"let emailSubscriptionType;\"> {{ emailSubscriptionType?.code }}\n </td>\n </ng-container>\n <ng-container matColumnDef=\"frequency.title\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>
|
|
4542
|
+
template: "<div class=\"mat-typography m-4\">\n <div fxLayout=\"row wrap\" fxLayoutAlign=\"start center\">\n <mat-form-field>\n <input matInput [formControl]=\"search\" placeholder=\"Email Type\" autocomplete=\"off\" />\n <button mat-button matSuffix mat-icon-button>\n <mat-icon>search</mat-icon>\n </button>\n <button mat-button *ngIf=\"search.value\" matSuffix mat-icon-button (click)=\"search.setValue('')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n <div class=\"ml-2\">\n <button mat-raised-button color=\"primary\" type=\"button\" (click)=\"addEmailSubscriptionType()\">+ Email\n Type</button>\n </div>\n <span fxFlex></span>\n <mat-form-field appearance=\"outline\" class=\"no-padding\">\n <mat-label>Columns</mat-label>\n <mat-select [formControl]=\"displayColumns\" multiple (selectionChange)=\"columnsChange()\">\n <mat-option *ngFor=\"let column of availableDisplayColumns\" [value]=\"column.value\">{{column.name}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n\n <section>\n <div class=\"scroll-container\" infiniteScroll [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\" [scrollWindow]=\"false\">\n <table mat-table [dataSource]=\"emailSubscriptionTypeList\" matSort class=\"w-100 mt-1\" multiTemplateDataRows\n id=\"email-subscription-type-table\">\n\n <!-- Index Column -->\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef> # </th>\n <td mat-cell *matCellDef=\"let emailSubscriptionType; let i = dataIndex\"> {{ i+1 }} </td>\n </ng-container>\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header> Title </th>\n <td mat-cell *matCellDef=\"let emailSubscriptionType;\"> {{ emailSubscriptionType?.title }} </td>\n </ng-container>\n <ng-container matColumnDef=\"code\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header> Code </th>\n <td mat-cell *matCellDef=\"let emailSubscriptionType;\"> {{ emailSubscriptionType?.code }}\n </td>\n </ng-container>\n <ng-container matColumnDef=\"frequency.title\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header> Frequency </th>\n <td mat-cell *matCellDef=\"let emailSubscriptionType;\"> {{ emailSubscriptionType?.frequency?.title }}\n </td>\n </ng-container>\n <ng-container matColumnDef=\"description\">\n <th mat-header-cell *matHeaderCellDef> Description </th>\n <td mat-cell *matCellDef=\"let emailSubscriptionType;\"> {{ emailSubscriptionType?.description }}\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef> Actions </th>\n <td mat-cell *matCellDef=\"let emailSubscriptionType\">\n <button type=\"button\" mat-icon-button\n (click)=\"deleteEmailSubscriptionType($event,emailSubscriptionType)\">\n <mat-icon>delete</mat-icon>\n </button>\n <button type=\"button\" mat-icon-button\n (click)=\"editEmailSubscriptionType($event,emailSubscriptionType)\">\n <mat-icon>edit</mat-icon>\n </button>\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky:true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n </div>\n </section>\n</div>",
|
|
4405
4543
|
styles: [".scroll-container{max-height:800px;overflow-y:auto}"]
|
|
4406
4544
|
},] }
|
|
4407
4545
|
];
|
|
@@ -6492,6 +6630,7 @@
|
|
|
6492
6630
|
};
|
|
6493
6631
|
this.displayedColumns = ['index', 'created_at'];
|
|
6494
6632
|
this.historyFilterForm = this.fb.group({
|
|
6633
|
+
'duration': [''],
|
|
6495
6634
|
'date_from': [''],
|
|
6496
6635
|
'date_to': ['']
|
|
6497
6636
|
});
|
|
@@ -6508,6 +6647,14 @@
|
|
|
6508
6647
|
});
|
|
6509
6648
|
this.initializeData();
|
|
6510
6649
|
};
|
|
6650
|
+
LoginHistoryForUserComponent.prototype.onTimelineChange = function (range) {
|
|
6651
|
+
var date_from = (range === null || range === void 0 ? void 0 : range.date_from) ? new Date(range.date_from) : '';
|
|
6652
|
+
var date_to = (range === null || range === void 0 ? void 0 : range.date_to) ? new Date(range.date_to) : '';
|
|
6653
|
+
this.historyFilterForm.patchValue({
|
|
6654
|
+
date_from: date_from,
|
|
6655
|
+
date_to: date_to
|
|
6656
|
+
});
|
|
6657
|
+
};
|
|
6511
6658
|
LoginHistoryForUserComponent.prototype.initializeData = function () {
|
|
6512
6659
|
var _this = this;
|
|
6513
6660
|
this.http.get("api/user-login-history", { params: Object.assign(Object.assign({}, this.filters), this.pageEvent) })
|
|
@@ -6541,7 +6688,7 @@
|
|
|
6541
6688
|
exports.LoginHistoryForUserComponent.decorators = [
|
|
6542
6689
|
{ type: i0.Component, args: [{
|
|
6543
6690
|
selector: 'app-login-history-for-user',
|
|
6544
|
-
template: "<div class=\"mat-typography m-4\">\n <form fxLayoutAlign=\" start center\">\n <app-timeline-filter
|
|
6691
|
+
template: "<div class=\"mat-typography m-4\">\n <form [formGroup]=\"historyFilterForm\" fxLayoutAlign=\" start center\">\n <app-timeline-filter formControlName=\"duration\" (selectionChange)=\"onTimelineChange($event)\"></app-timeline-filter>\n </form>\n\n <section>\n <div class=\"scroll-container\" infiniteScroll [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\" [scrollWindow]=\"false\">\n <table mat-table [dataSource]=\"loginHistoryList\" matSort class=\"w-100 mt-1\" multiTemplateDataRows\n id=\"login-history-table\">\n\n <!-- Index Column -->\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef> # </th>\n <td mat-cell *matCellDef=\"let loginHistory; let i = dataIndex\"> {{ i+1 }} </td>\n </ng-container>\n\n <ng-container matColumnDef=\"created_at\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header> Last Login</th>\n <td mat-cell *matCellDef=\"let loginHistory;\">\n {{loginHistory?.created_at | date:'medium' }}\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns;\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n </div>\n\n </section>\n</div>\n",
|
|
6545
6692
|
styles: [".scroll-container{max-height:800px;overflow-y:auto}"]
|
|
6546
6693
|
},] }
|
|
6547
6694
|
];
|