Skip to content

Commit c140c57

Browse files
4manasamanasa
andauthored
Refresh not triggered on Details,subTabs template issue fixed (#300)
* Refresh not triggered on Details,subTabs template issue fixed * Time payload issue fixed --------- Co-authored-by: manasa <[email protected]>
1 parent 3e0d443 commit c140c57

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

packages/angular-sdk-components/src/lib/_components/field/time/time.component.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,12 @@ export class TimeComponent implements OnInit, OnDestroy {
172172
}
173173

174174
fieldOnBlur(event: any) {
175-
const value = event?.target?.value;
175+
let value = event?.target?.value;
176+
const hhmmPattern = /^\d{2}:\d{2}$/;
177+
if (hhmmPattern.test(value)) {
178+
value = `${value}:00`; // append ":00"
179+
}
180+
176181
handleEvent(this.actionsApi, 'changeNblur', this.propName, value);
177182
}
178183

packages/angular-sdk-components/src/lib/_components/infra/defer-load/defer-load.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
3838
CASE: any;
3939
PAGE: any;
4040
DATA: any;
41+
lastUpdateCaseTime;
4142
constructor(private angularPConnect: AngularPConnectService) {
4243
this.constants = PCore.getConstants();
4344
}
@@ -58,8 +59,10 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
5859
// Should always check the bridge to see if the component should
5960
// update itself (re-render)
6061
const theRequestedAssignment = this.pConn$.getValue(PCore.getConstants().CASE_INFO.ASSIGNMENT_LABEL);
61-
if (theRequestedAssignment !== this.currentLoadedAssignment) {
62+
const lastUpdateCaseTime = this.pConn$.getValue('caseInfo.lastUpdateTime');
63+
if (theRequestedAssignment !== this.currentLoadedAssignment || (lastUpdateCaseTime && lastUpdateCaseTime !== this.lastUpdateCaseTime)) {
6264
this.currentLoadedAssignment = theRequestedAssignment;
65+
this.lastUpdateCaseTime = lastUpdateCaseTime;
6366
this.loadActiveTab();
6467
}
6568
}

0 commit comments

Comments
 (0)