From 617a7775975dfb24814dbde2fa011583ffd6d71d Mon Sep 17 00:00:00 2001 From: hillelcoren Date: Mon, 26 Dec 2022 18:23:58 +0000 Subject: [PATCH] Admin Portal - Profile --- public/main.profile.dart.js | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/public/main.profile.dart.js b/public/main.profile.dart.js index b5e5e119a6ea..db708e9a2857 100644 --- a/public/main.profile.dart.js +++ b/public/main.profile.dart.js @@ -122548,7 +122548,7 @@ return A.DateFormat$("y-M-D " + format, A.localeSelector(t1, false))._date_format$_parse$3$strict$utc("2000-01-01 " + value, false, false); }, formatDate(value, context, showDate, showSeconds, showTime) { - var t1, t2, t3, company, format, dateFormats, dateFormatId, formatter, parsed, + var t1, t2, t3, company, format, dateFormats, dateFormatId, formatter, parsed, formattedValue, _s9_ = "h:mm:ss a"; if (value == null || value.length === 0) return ""; @@ -122577,14 +122577,15 @@ } formatter = A.DateFormat$(format, A.localeSelector(t1, false)); parsed = A.DateTime_tryParse(J.endsWith$1$s(value, "Z") ? value : value + "Z"); - return parsed == null ? "" : formatter.format$1(0, parsed.toLocal$0()); + formattedValue = parsed == null ? "" : formatter.format$1(0, parsed.toLocal$0()); } else { dateFormats = t1.staticState.dateFormatMap; t2 = company.settings.dateFormatId; formatter = A.DateFormat$(dateFormats._map$_map.$index(0, t2).format, A.localeSelector(t1, false)); parsed = A.DateTime_tryParse(value); - return parsed == null ? "" : formatter.format$1(0, parsed); + formattedValue = parsed == null ? "" : formatter.format$1(0, parsed); } + return B.JSString_methods.replaceFirst$2(formattedValue, "..", "."); }, formatApiUrl(url) { url = A.cleanApiUrl(url); @@ -165828,6 +165829,9 @@ call$1$semanticsEnabled($0) { return this.noSuchMethod$1(this, A.createInvocationMirror("call", "call$1$semanticsEnabled", 0, [$0], ["semanticsEnabled"], 0)); }, + call$2$aspect($0, $1) { + return this.noSuchMethod$1(this, A.createInvocationMirror("call", "call$2$aspect", 0, [$0, $1], ["aspect"], 0)); + }, call$2$priority$scheduler($0, $1) { return this.noSuchMethod$1(this, A.createInvocationMirror("call", "call$2$priority$scheduler", 0, [$0, $1], ["priority", "scheduler"], 0)); }, @@ -165837,9 +165841,6 @@ call$1$style($0) { return this.noSuchMethod$1(this, A.createInvocationMirror("call", "call$1$style", 0, [$0], ["style"], 0)); }, - call$2$aspect($0, $1) { - return this.noSuchMethod$1(this, A.createInvocationMirror("call", "call$2$aspect", 0, [$0, $1], ["aspect"], 0)); - }, call$2$primary$secondary($0, $1) { return this.noSuchMethod$1(this, A.createInvocationMirror("call", "call$2$primary$secondary", 0, [$0, $1], ["primary", "secondary"], 0)); }, @@ -346787,9 +346788,22 @@ return A.Duration$(0, 0, 0, t1._value - this.startDate._value, 0, 0); }, get$asList() { - var t1 = B.JSNumber_methods.floor$0(this.startDate._value / 1000), - t2 = this.endDate; - return [t1, t2 != null ? B.JSNumber_methods.floor$0(t2._value / 1000) : 0]; + var t2, + startTime = B.JSNumber_methods.floor$0(this.startDate._value / 1000), + t1 = this.endDate, + endTime = t1 != null ? B.JSNumber_methods.floor$0(t1._value / 1000) : 0; + t1 = $.$get$navigatorKey(); + t1.toString; + t1 = A.StoreProvider_of($.WidgetsBinding__instance.WidgetsBinding__buildOwner._globalKeyRegistry.$index(0, t1), type$.legacy_AppState).__Store__state_A; + t1 === $ && A.throwUnnamedLateFieldNI(); + t2 = t1.userCompanyStates; + t1 = t1.uiState.selectedCompanyIndex; + if (!t2._list[t1].userCompany.company.showTaskEndDate && endTime !== 0) + if (endTime < startTime) + endTime += 86400; + else if (endTime - startTime > 86400) + endTime -= 86400; + return [startTime, endTime]; }, get$stop(_) { return this.rebuild$1(new A.TaskTime_stop_closure()); @@ -487462,6 +487476,8 @@ t1 = A.Localizations_of(context, B.Type_AppLocalization_KyD, type$.legacy_AppLocalization), viewModel = _this._widget.viewModel, showEndDate = viewModel.company.showTaskEndDate, + times = _this._taskTime.get$asList(), + duration = A.Duration$(0, 0, 0, 0, 0, J.$sub$n(times[1], times[0])), t2 = _this._startTimeUpdatedAt, t3 = type$.ValueKey_legacy_String, t4 = showEndDate ? t1.get$startDate() : t1.get$date(), @@ -487485,7 +487501,7 @@ t8 = _this._endDateUpdatedAt; t9 = t1.get$duration(t1); t10 = _this._taskTime; - t10 = t10.startDate == null || t10.endDate == null ? _null : t10.get$duration(t10); + t10 = t10.startDate == null || t10.endDate == null ? _null : duration; t5.push(new A.DurationPicker(t10, new A.TimeEditDetailsState_build_closure3(_this, viewModel), t9, new A.ValueKey("__duration_" + t2 + "_" + t4 + "_" + t7 + "_" + t8 + "_", t3))); t5 = A.SingleChildScrollView$(A.Column$(t5, B.CrossAxisAlignment_2, _null, B.MainAxisAlignment_0, B.MainAxisSize_0, B.VerticalDirection_1), _null, B.DragStartBehavior_1, _null, _null, _null, _null, false, B.Axis_1); return A.AlertDialog$(A._setArrayType([A.TextButton$(false, A.Text$(t1.get$remove(t1).toUpperCase(), _null, _null, _null, _null, _null, _null, _null, _null, _null), _null, _null, new A.TimeEditDetailsState_build_closure4(_this, context), _null), A.TextButton$(false, A.Text$(t1.get$done().toUpperCase(), _null, _null, _null, _null, _null, _null, _null, _null, _null), _null, _null, new A.TimeEditDetailsState_build_closure5(_this, context), _null)], t6), _null, _null, t5, _null, _null, _null);