@convep_mobilogy/react-native-qms-plugin 1.6.0 → 1.6.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.
@@ -109,9 +109,9 @@ static NSString * const kQmsRoutePayloadNotification = @"QmsRoutePayloadNotifica
109
109
  _dashboardVC = [QmsPluginUI makeViewController];
110
110
 
111
111
  [parentVC addChildViewController:_dashboardVC];
112
- _dashboardVC.view.frame = self.bounds;
112
+ _dashboardVC.view.frame = parentVC.view.bounds;
113
113
  _dashboardVC.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
114
- [self addSubview:_dashboardVC.view];
114
+ [parentVC.view addSubview:_dashboardVC.view];
115
115
  [_dashboardVC didMoveToParentViewController:parentVC];
116
116
  _didSetupVC = YES;
117
117
 
@@ -123,13 +123,6 @@ static NSString * const kQmsRoutePayloadNotification = @"QmsRoutePayloadNotifica
123
123
  }
124
124
  }
125
125
 
126
- - (void)layoutSubviews {
127
- [super layoutSubviews];
128
- if (_dashboardVC && _dashboardVC.view.superview == self) {
129
- _dashboardVC.view.frame = self.bounds;
130
- }
131
- }
132
-
133
126
  - (void)handleDashboardClose:(NSNotification *)note {
134
127
  // 1️⃣ Notify JS
135
128
  if (self.onClose) {
@@ -273,19 +266,6 @@ static NSString * const kQmsRoutePayloadNotification = @"QmsRoutePayloadNotifica
273
266
  return [value description];
274
267
  }
275
268
 
276
- - (NSNumber *)numberFromPayload:(NSDictionary *)payload key:(NSString *)key {
277
- NSString *value = [self stringFromPayload:payload key:key];
278
- if (value.length == 0) return nil;
279
-
280
- NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init];
281
- formatter.numberStyle = NSNumberFormatterDecimalStyle;
282
- NSNumber *number = [formatter numberFromString:value];
283
- if (number) return number;
284
-
285
- long long fallback = value.longLongValue;
286
- return fallback > 0 ? @(fallback) : nil;
287
- }
288
-
289
269
  - (BOOL)isIssueType:(NSString *)type {
290
270
  static NSSet<NSString *> *types;
291
271
  static dispatch_once_t onceToken;
@@ -406,30 +386,8 @@ static NSString * const kQmsRoutePayloadNotification = @"QmsRoutePayloadNotifica
406
386
  [self presentDeepLinkVC:vc];
407
387
  }
408
388
 
409
- - (void)presentIssueDetailViewControllerWithPayload:(NSDictionary *)payload title:(NSString *)title {
410
- Class cls = NSClassFromString(@"IssueDetailViewController");
411
- if (!cls) return;
412
- UIViewController *vc = [[cls alloc] init];
413
- if (!vc) return;
414
-
415
- NSNumber *issueId = [self numberFromPayload:payload key:@"issue_id"];
416
- NSString *projName = [self projectNameFromTitle:title];
417
- if (!issueId) {
418
- NSLog(@"🧭 new_info payload missing issue_id; cannot route to IssueDetailViewController");
419
- return;
420
- }
421
-
422
- @try {
423
- [vc setValue:issueId forKey:@"issueId"];
424
- if (projName.length > 0) [vc setValue:projName forKey:@"projectName"];
425
- [vc setValue:@"notification" forKey:@"navFrom"];
426
- } @catch (__unused NSException *e) {}
427
-
428
- [self presentDeepLinkVC:vc];
429
- }
430
-
431
- - (void)presentAppointmentDetailsViewControllerWithPayload:(NSDictionary *)payload title:(NSString *)title {
432
- Class cls = NSClassFromString(@"AppointmentDetailsViewController");
389
+ - (void)presentAppointmentViewControllerWithPayload:(NSDictionary *)payload title:(NSString *)title {
390
+ Class cls = NSClassFromString(@"AppointmentViewMoreViewController");
433
391
  if (!cls) return;
434
392
  UIViewController *vc = [[cls alloc] init];
435
393
  if (!vc) return;
@@ -437,8 +395,8 @@ static NSString * const kQmsRoutePayloadNotification = @"QmsRoutePayloadNotifica
437
395
  [self presentDeepLinkVC:vc];
438
396
  }
439
397
 
440
- - (void)presentDashboardViewControllerWithPayload:(NSDictionary *)payload title:(NSString *)title {
441
- Class cls = NSClassFromString(@"DashboardViewController");
398
+ - (void)presentGeneralInfoViewControllerWithPayload:(NSDictionary *)payload title:(NSString *)title {
399
+ Class cls = NSClassFromString(@"GeneralInfoViewController");
442
400
  if (!cls) return;
443
401
  UIViewController *vc = [[cls alloc] init];
444
402
  if (!vc) return;
@@ -469,14 +427,14 @@ static NSString * const kQmsRoutePayloadNotification = @"QmsRoutePayloadNotifica
469
427
  title ?: @"");
470
428
 
471
429
  if ([self isIssueType:type]) {
472
- NSLog(@"🧭 routing new_info → IssueDetailViewController");
473
- [self presentIssueDetailViewControllerWithPayload:payload title:title ?: @""];
430
+ NSLog(@"🧭 routing issue type → IssuesViewController");
431
+ [self presentIssuesViewControllerWithPayload:payload title:title ?: @""];
474
432
  } else if ([self isAppointmentType:type]) {
475
- NSLog(@"🧭 routing appointment type → AppointmentDetailsViewController");
476
- [self presentAppointmentDetailsViewControllerWithPayload:payload title:title ?: @""];
433
+ NSLog(@"🧭 routing appointment type → AppointmentViewMoreViewController");
434
+ [self presentAppointmentViewControllerWithPayload:payload title:title ?: @""];
477
435
  } else if ([type isEqualToString:@"clearance_letter"]) {
478
436
  NSLog(@"🧭 routing clearance_letter → GeneralInfoViewController");
479
- [self presentDashboardViewControllerWithPayload:payload title:title ?: @""];
437
+ [self presentGeneralInfoViewControllerWithPayload:payload title:title ?: @""];
480
438
  } else {
481
439
  NSLog(@"🧭 no route matched for type=%@", type ?: @"");
482
440
  }
@@ -46,7 +46,7 @@
46
46
  </data>
47
47
  <key>en.json</key>
48
48
  <data>
49
- qus9dWyIVEzCyX/BmtDr3Fo8osU=
49
+ l8iMksJDucFJaZofcOo2hrY21BY=
50
50
  </data>
51
51
  </dict>
52
52
  <key>files2</key>
@@ -118,7 +118,7 @@
118
118
  <dict>
119
119
  <key>hash2</key>
120
120
  <data>
121
- HBxOIFOudwBFbzTdYQxnKKQfMlQQFxxbLkHdBmvOLDY=
121
+ Tre1koEy/eLKUy028iAGoeZpkLqlFEemmRHRbgjnGD8=
122
122
  </data>
123
123
  </dict>
124
124
  </dict>
@@ -742,7 +742,7 @@
742
742
  "SEARCH_UNITNAME": "Search Name or Unit Number...",
743
743
  "THIRDPARTYLINK": "3rd Party Link",
744
744
  "ADD": "Add",
745
- "ALL_ITEMS_DISPLAY": "All items displayed.",
745
+ "ALL_ITEMS_DISPLAY": "All items displayed",
746
746
  "ALERT_ENTER_LINK": "Please enter a link name.",
747
747
  "LINK_SUCCESS_CREATED": "3rd party link has been successfully created.",
748
748
  "ADD_LINK": "Add 3rd Party Link",
@@ -46,7 +46,7 @@
46
46
  </data>
47
47
  <key>en.json</key>
48
48
  <data>
49
- qus9dWyIVEzCyX/BmtDr3Fo8osU=
49
+ l8iMksJDucFJaZofcOo2hrY21BY=
50
50
  </data>
51
51
  </dict>
52
52
  <key>files2</key>
@@ -118,7 +118,7 @@
118
118
  <dict>
119
119
  <key>hash2</key>
120
120
  <data>
121
- HBxOIFOudwBFbzTdYQxnKKQfMlQQFxxbLkHdBmvOLDY=
121
+ Tre1koEy/eLKUy028iAGoeZpkLqlFEemmRHRbgjnGD8=
122
122
  </data>
123
123
  </dict>
124
124
  </dict>
@@ -742,7 +742,7 @@
742
742
  "SEARCH_UNITNAME": "Search Name or Unit Number...",
743
743
  "THIRDPARTYLINK": "3rd Party Link",
744
744
  "ADD": "Add",
745
- "ALL_ITEMS_DISPLAY": "All items displayed.",
745
+ "ALL_ITEMS_DISPLAY": "All items displayed",
746
746
  "ALERT_ENTER_LINK": "Please enter a link name.",
747
747
  "LINK_SUCCESS_CREATED": "3rd party link has been successfully created.",
748
748
  "ADD_LINK": "Add 3rd Party Link",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@convep_mobilogy/react-native-qms-plugin",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "To handle defect managment",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",