Bug #19075

FE - React - Rerender the children after language changed

Added by chok yee fan 11 months ago. Updated 9 months ago.

Status:FeedbackStart date:04 December 2023
Priority:NormalDue date:
Assignee:chok yee fan% Done:

100%

Category:-Spent time:-
Target version:-

Description

issue
-----
webservice data loaded is EN, after change language to MY. Label changed but data still EN.

Expected
-----
Data loaded is EN, change language to MY, data should change to MY as well.

Solution
-----
Try to refresh the children page when language been changed.

Screenshot 2024-01-29 121451.png (105 KB) Tan Jiau Yan, 29 January 2024 12:14 PM

Screenshot 2024-02-07 at 11.16.18 AM.png - mlebFunctionNoReflectRecord (630 KB) chok yee fan, 07 February 2024 11:16 AM

History

#1 Updated by Amirul Umar Pandai 10 months ago

  • Status changed from New to Resolved
  • Assignee changed from Amirul Umar Pandai to chok yee fan
  • % Done changed from 0 to 50

Only org profile and user role pages implemented this fix, as a proof of concept. If this feature works as intended, I will apply it to the rest of the pages.

- re-populate form on language change (#19075, organisation profile + user role page only)
- fix org profile view cancel behaviour (#19106)

https://dev.silverlakemobility.com/gitlab/mleb-solution-domain/smesd100/mleb-iam/-/commit/966508fdc788fb2f6eef2cfaaed8b11f7a9a0854

#2 Updated by chok yee fan 10 months ago

  • Status changed from Resolved to Assigned
  • Assignee changed from chok yee fan to Amirul Umar Pandai

please apply it into organisation profile search as well, let see have any issue or not

#3 Updated by Amirul Umar Pandai 10 months ago

  • Assignee changed from Amirul Umar Pandai to chok yee fan
  • % Done changed from 50 to 100

Applied change to remaining pages except for the following (did not contain call to searchForm/dataEntryForm ws):
- Business Constitution
- Country
- Message Template
- Security Policy
- User Profile ("System Info" tab)


re-retrieve data on language change

https://dev.silverlakemobility.com/gitlab/mleb-solution-domain/smesd100/mleb-iam/-/commit/9bf44368cea83178f93b7422448490470a0ddd41

#4 Updated by chok yee fan 9 months ago

  • Assignee changed from chok yee fan to Amirul Umar Pandai

please cross check for each modules

#5 Updated by Amirul Umar Pandai 9 months ago

  • Assignee changed from Amirul Umar Pandai to chok yee fan

Redesigned logic for running code on language change. Created custom hook to make applying to new pages easier


useEffectOnce + useLanguageChanged custom hook

https://dev.silverlakemobility.com/gitlab/mleb-solution-domain/smesd100/mleb-iam/-/commit/f1d3d62434b13f80bab35926265f33721e10876f

#6 Updated by Tan Jiau Yan 9 months ago

Issue :

After change language, the title in data table no changed into the correct language. But, it changed when click the another module and click back to ori module to call searchForm and searchAction ws.

Expected :

After change language, the title in data table should be changed into the correct language.

#7 Updated by Amirul Umar Pandai 9 months ago

  • Assignee changed from Amirul Umar Pandai to chok yee fan

#8 Updated by chok yee fan 9 months ago

issue
-----
modify function -> change language -> record no change.

expected
-----
modify function -> change language -> record refresh.

#9 Updated by Amirul Umar Pandai 9 months ago

  • Assignee changed from Amirul Umar Pandai to Hazimi Muhammad

#10 Updated by Hazimi Muhammad 9 months ago

  • Status changed from Assigned to Feedback
  • Assignee changed from Hazimi Muhammad to chok yee fan

Issue has been fixed.

Already test for this module when modify and change the language, the form will refresh.

business-constitution
country
mleb-function
mleb-system
organization-profile
user-category
user-profile

Click User Profile -> click Search button -> click data in table -> click modify -> modify the form -> click change language button -> the record had been refresh.

Also available in: Atom PDF