@convep_mobilogy/react-native-qms-plugin 1.4.0 → 1.5.0

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.
Files changed (20) hide show
  1. package/README.md +470 -36
  2. package/android/build.gradle +1 -1
  3. package/ios/QmsPlugin/QmsDashboardViewManager.mm +101 -33
  4. package/ios/QmsPluginFramework.xcframework/ios-arm64/QmsPluginFramework.framework/Assets.car +0 -0
  5. package/ios/QmsPluginFramework.xcframework/ios-arm64/QmsPluginFramework.framework/QmsPluginFramework +0 -0
  6. package/ios/QmsPluginFramework.xcframework/ios-arm64/QmsPluginFramework.framework/_CodeSignature/CodeResources +4 -4
  7. package/ios/QmsPluginFramework.xcframework/ios-arm64/QmsPluginFramework.framework/en.json +1 -1
  8. package/ios/QmsPluginFramework.xcframework/ios-arm64_x86_64-simulator/QmsPluginFramework.framework/Assets.car +0 -0
  9. package/ios/QmsPluginFramework.xcframework/ios-arm64_x86_64-simulator/QmsPluginFramework.framework/QmsPluginFramework +0 -0
  10. package/ios/QmsPluginFramework.xcframework/ios-arm64_x86_64-simulator/QmsPluginFramework.framework/_CodeSignature/CodeResources +4 -4
  11. package/ios/QmsPluginFramework.xcframework/ios-arm64_x86_64-simulator/QmsPluginFramework.framework/en.json +1 -1
  12. package/lib/module/QmsDashboardView.android.js +1 -0
  13. package/lib/module/QmsDashboardView.android.js.map +1 -1
  14. package/lib/module/QmsDashboardView.ios.js +3 -0
  15. package/lib/module/QmsDashboardView.ios.js.map +1 -1
  16. package/lib/typescript/src/QmsDashboardView.android.d.ts.map +1 -1
  17. package/lib/typescript/src/QmsDashboardView.ios.d.ts.map +1 -1
  18. package/package.json +1 -1
  19. package/src/QmsDashboardView.android.tsx +1 -0
  20. package/src/QmsDashboardView.ios.tsx +3 -0
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # Welcome to @convep_mobilogy/react-native-qms-plugin
1
+ # @convep_mobilogy/react-native-qms-plugin
2
2
 
3
- A React Native plugin that provides \***\*QMS (Quality Management System)\*\*** components and APIs for defect management, dashboard visualization, and QMS workflow operations.
3
+ A React Native plugin that provides QMS (Quality Management System) components and APIs for defect management, dashboard visualization, and QMS workflow operations.
4
4
 
5
5
  ---
6
6
 
@@ -35,16 +35,16 @@ pod install
35
35
 
36
36
  # Android Setup
37
37
 
38
- Autolinking should set up everything automatically, but you need to add our private Maven repo and enable core library desugaring.
38
+ Autolinking should set up everything automatically, but you need to add the private Maven repo and enable core library desugaring.
39
39
 
40
- 1. In your **android/build.gradle**, add the Maven repo with your credentials:
40
+ 1. In `android/build.gradle`, add the Maven repo:
41
41
 
42
42
  ```gradle
43
43
  allprojects {
44
44
  repositories {
45
45
  google()
46
46
  mavenCentral()
47
- maven { url = uri("https://www.jitpack.io") } // keep JitPack if RN needs it
47
+ maven { url = uri("https://www.jitpack.io") }
48
48
 
49
49
  maven {
50
50
  url = uri("https://raw.githubusercontent.com/ConvepMobilogy/QMS_framework/main/maven-repo")
@@ -53,7 +53,7 @@ allprojects {
53
53
  }
54
54
  ```
55
55
 
56
- 2. In **android/app/build.gradle**, enable core library desugaring (inside `dependencies`):
56
+ 2. In `android/app/build.gradle`, enable core library desugaring inside `dependencies`:
57
57
 
58
58
  ```gradle
59
59
  dependencies {
@@ -61,20 +61,19 @@ dependencies {
61
61
  coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.4")
62
62
  }
63
63
  ```
64
- 3. In **android/app/build.gradle**, enable core library desugaring (inside `android`):
64
+
65
+ 3. In `android/app/build.gradle`, enable core library desugaring inside `android`:
65
66
 
66
67
  ```gradle
67
68
  android {
68
69
  compileOptions {
69
- // you can match whatever your rootProject uses, 11 is safe
70
70
  sourceCompatibility JavaVersion.VERSION_11
71
71
  targetCompatibility JavaVersion.VERSION_11
72
-
73
- // this is what your AAR is demanding
74
72
  coreLibraryDesugaringEnabled true
75
73
  }
76
74
  }
77
75
  ```
76
+
78
77
  ---
79
78
 
80
79
  # Usage
@@ -83,12 +82,7 @@ Use `QmsDashboardView` to render the native QMS screen.
83
82
 
84
83
  ```tsx
85
84
  import React from 'react';
86
- import {
87
- BackHandler,
88
- Button,
89
- StyleSheet,
90
- View,
91
- } from 'react-native';
85
+ import { Button, StyleSheet, View } from 'react-native';
92
86
  import { QmsDashboardView } from '@convep_mobilogy/react-native-qms-plugin';
93
87
 
94
88
  export default function App() {
@@ -106,9 +100,7 @@ export default function App() {
106
100
  clientID={clientID}
107
101
  clientCode={clientCode}
108
102
  userToken={userToken}
109
- onClose={() => {
110
- setShowQms(false);
111
- }}
103
+ onClose={() => setShowQms(false)}
112
104
  onAnalyticsScreen={(screenName, screenClass) => {
113
105
  console.log('screen:', screenName, screenClass);
114
106
  }}
@@ -131,29 +123,359 @@ const styles = StyleSheet.create({
131
123
  });
132
124
  ```
133
125
 
134
- ### `QmsDashboardView` props
126
+ ---
127
+
128
+ # Props
129
+
130
+ ## QmsDashboardView Props
131
+
132
+ Inherits React Native `View` styling through the `style` prop.
133
+
134
+ ---
135
+
136
+ ### `style`
137
+
138
+ Layout and styling for the React Native wrapper view.
139
+
140
+ | Type | Default |
141
+ | --- | --- |
142
+ | `StyleProp<ViewStyle>` | `undefined` |
143
+
144
+ Example:
145
+
146
+ ```tsx
147
+ <QmsDashboardView style={{ flex: 1 }} />
148
+ ```
149
+
150
+ ---
151
+
152
+ ### `clientID` <sup>`iOS` `Android`</sup>
153
+
154
+ QMS client ID used to start an authenticated dashboard session.
155
+
156
+ | Type | Default |
157
+ | --- | --- |
158
+ | `string` | `''` |
159
+
160
+ Example:
161
+
162
+ ```tsx
163
+ <QmsDashboardView clientID="123" />
164
+ ```
165
+
166
+ ---
167
+
168
+ ### `clientCode` <sup>`iOS` `Android`</sup>
169
+
170
+ Company code used with `clientID` and `userToken`.
171
+
172
+ | Type | Default |
173
+ | --- | --- |
174
+ | `string` | `''` |
175
+
176
+ Example:
177
+
178
+ ```tsx
179
+ <QmsDashboardView clientCode="CONVEP" />
180
+ ```
181
+
182
+ ---
183
+
184
+ ### `userToken` <sup>`iOS` `Android`</sup>
185
+
186
+ User authentication token used by the native QMS SDK.
187
+
188
+ | Type | Default |
189
+ | --- | --- |
190
+ | `string` | `''` |
191
+
192
+ Example:
193
+
194
+ ```tsx
195
+ <QmsDashboardView userToken="user-auth-token" />
196
+ ```
197
+
198
+ ---
199
+
200
+ ### `onClose` <sup>`iOS` `Android`</sup>
201
+
202
+ Called when the native QMS dashboard closes.
203
+
204
+ | Type | Default |
205
+ | --- | --- |
206
+ | `(event?: unknown) => void` | `undefined` |
207
+
208
+ Example:
209
+
210
+ ```tsx
211
+ <QmsDashboardView onClose={() => setShowQms(false)} />
212
+ ```
213
+
214
+ ---
215
+
216
+ ### `onAnalyticsScreen` <sup>`iOS` `Android`</sup>
217
+
218
+ Called when the native SDK reports a screen view.
219
+
220
+ | Type | Default |
221
+ | --- | --- |
222
+ | `(screenName?: string, screenClass?: string) => void` | `undefined` |
223
+
224
+ Example:
225
+
226
+ ```tsx
227
+ <QmsDashboardView
228
+ onAnalyticsScreen={(screenName, screenClass) => {
229
+ console.log('screen:', screenName, screenClass);
230
+ }}
231
+ />
232
+ ```
233
+
234
+ ---
235
+
236
+ ### `onAnalyticsEvent` <sup>`iOS` `Android`</sup>
237
+
238
+ Called when the native SDK reports an analytics event.
239
+
240
+ | Type | Default |
241
+ | --- | --- |
242
+ | `(eventName?: string, params?: Record<string, unknown> | null) => void` | `undefined` |
243
+
244
+ Example:
245
+
246
+ ```tsx
247
+ <QmsDashboardView
248
+ onAnalyticsEvent={(eventName, params) => {
249
+ console.log('event:', eventName, params);
250
+ }}
251
+ />
252
+ ```
253
+
254
+ ---
255
+
256
+ ### `onLocate` <sup>`Android`</sup>
257
+
258
+ Called when the Android SDK emits a location event.
259
+
260
+ | Type | Default |
261
+ | --- | --- |
262
+ | `(lat?: string, lng?: string) => void` | `undefined` |
263
+
264
+ Example:
265
+
266
+ ```tsx
267
+ <QmsDashboardView
268
+ onLocate={(lat, lng) => {
269
+ console.log('location:', lat, lng);
270
+ }}
271
+ />
272
+ ```
273
+
274
+ ---
275
+
276
+ ### `themeColor` <sup>`iOS` `Android`</sup>
277
+
278
+ Primary theme color override. Use a hex color string supported by the native SDK.
279
+
280
+ | Type | Default |
281
+ | --- | --- |
282
+ | `string` | `''` |
283
+
284
+ Example:
285
+
286
+ ```tsx
287
+ <QmsDashboardView themeColor="#00A6A6" />
288
+ ```
289
+
290
+ ---
135
291
 
136
- - `clientID` (`string`): QMS client ID.
137
- - `clientCode` (`string`): Company code.
138
- - `userToken` (`string`): User auth token.
139
- - `onClose` (`(event?) => void`): Called when dashboard exits.
140
- - `onAnalyticsScreen` (`(screenName?, screenClass?) => void`): Screen tracking callback.
141
- - `onAnalyticsEvent` (`(eventName?, params?) => void`): Event tracking callback.
142
- - `themeColor`, `headerThemeColor`, `accentColor` (`string`): Theme overrides.
143
- - `fontFamily` (`string`): Custom font family.
144
- - `payload` (`Record<string, unknown> | null`): Optional data payload.
292
+ ### `headerThemeColor` <sup>`iOS` `Android`</sup>
145
293
 
146
- Backwards-compatible prop aliases are also supported: `ClientID`, `ClientCode`, `user_token`, and `token`.
294
+ Convenience color override applied to both header text and header icons unless `headerTextColor` or `headerIconColor` is provided separately.
147
295
 
148
- ## In-App Notification Usage
296
+ | Type | Default |
297
+ | --- | --- |
298
+ | `string` | `''` |
149
299
 
150
- Use `QmsPlugin.emitInAppNotification(payload)` to forward a notification into the native SDK layer.
300
+ Example:
301
+
302
+ ```tsx
303
+ <QmsDashboardView headerThemeColor="#FFFFFF" />
304
+ ```
305
+
306
+ ---
307
+
308
+ ### `headerTextColor` <sup>`iOS` `Android`</sup>
309
+
310
+ Header text color override.
311
+
312
+ | Type | Default |
313
+ | --- | --- |
314
+ | `string` | `''` |
315
+
316
+ Example:
317
+
318
+ ```tsx
319
+ <QmsDashboardView headerTextColor="#111827" />
320
+ ```
321
+
322
+ ---
323
+
324
+ ### `headerIconColor` <sup>`iOS` `Android`</sup>
325
+
326
+ Header icon color override.
327
+
328
+ | Type | Default |
329
+ | --- | --- |
330
+ | `string` | `''` |
331
+
332
+ Example:
333
+
334
+ ```tsx
335
+ <QmsDashboardView headerIconColor="#111827" />
336
+ ```
337
+
338
+ ---
339
+
340
+ ### `accentColor` <sup>`iOS` `Android`</sup>
341
+
342
+ Accent color override for supported native SDK elements.
343
+
344
+ | Type | Default |
345
+ | --- | --- |
346
+ | `string` | `''` |
347
+
348
+ Example:
349
+
350
+ ```tsx
351
+ <QmsDashboardView accentColor="#F59E0B" />
352
+ ```
353
+
354
+ ---
355
+
356
+ ### `fontFamily` <sup>`iOS` `Android`</sup>
357
+
358
+ Custom font family name passed to the native SDK.
359
+
360
+ | Type | Default |
361
+ | --- | --- |
362
+ | `string` | `''` |
363
+
364
+ Example:
365
+
366
+ ```tsx
367
+ <QmsDashboardView fontFamily="Montserrat" />
368
+ ```
369
+
370
+ ---
371
+
372
+ ### `payload` <sup>`iOS` `Android`</sup>
373
+
374
+ Optional data payload forwarded to the native dashboard. Android uses `showQmsWithPayload` when the payload is not empty.
375
+
376
+ | Type | Default |
377
+ | --- | --- |
378
+ | `Record<string, unknown> | null` | `null` |
379
+
380
+ Example:
381
+
382
+ ```tsx
383
+ <QmsDashboardView
384
+ payload={route?.params?.notificationData ?? null}
385
+ />
386
+ ```
387
+
388
+ ---
389
+
390
+ ### `ClientID` <sup>`iOS` `Android`</sup>
391
+
392
+ Backwards-compatible alias for `clientID`.
393
+
394
+ | Type | Default |
395
+ | --- | --- |
396
+ | `string` | `''` |
397
+
398
+ Example:
399
+
400
+ ```tsx
401
+ <QmsDashboardView ClientID="123" />
402
+ ```
403
+
404
+ ---
405
+
406
+ ### `ClientCode` <sup>`iOS` `Android`</sup>
407
+
408
+ Backwards-compatible alias for `clientCode`.
409
+
410
+ | Type | Default |
411
+ | --- | --- |
412
+ | `string` | `''` |
413
+
414
+ Example:
415
+
416
+ ```tsx
417
+ <QmsDashboardView ClientCode="CONVEP" />
418
+ ```
419
+
420
+ ---
421
+
422
+ ### `user_token` <sup>`iOS` `Android`</sup>
423
+
424
+ Backwards-compatible alias for `userToken`.
425
+
426
+ | Type | Default |
427
+ | --- | --- |
428
+ | `string` | `''` |
429
+
430
+ Example:
431
+
432
+ ```tsx
433
+ <QmsDashboardView user_token="user-auth-token" />
434
+ ```
435
+
436
+ ---
437
+
438
+ # Notification Usage
439
+
440
+ Client apps must receive FCM notifications and decide how to route them. QMS SDK notifications can be identified from the data payload with `origin: 'QMS-SDK'`.
441
+
442
+ Example QMS notification payload:
443
+
444
+ ```json
445
+ {
446
+ "message": {
447
+ "notification": {
448
+ "android": {},
449
+ "body": "Test body",
450
+ "title": "Test title"
451
+ },
452
+ "sentTime": 1769490551181,
453
+ "data": {
454
+ "type": "issues_complete",
455
+ "show_in_foreground": "1",
456
+ "plan_id": "136",
457
+ "id_number": "800201065157",
458
+ "origin": "QMS-SDK"
459
+ }
460
+ }
461
+ }
462
+ ```
463
+
464
+ ## Foreground Notifications
465
+
466
+ When the app receives a foreground QMS SDK notification, forward it to the native SDK with `QmsPlugin.emitInAppNotification(payload)`.
151
467
 
152
468
  ```tsx
153
469
  import messaging from '@react-native-firebase/messaging';
154
470
  import { QmsPlugin } from '@convep_mobilogy/react-native-qms-plugin';
155
471
 
472
+ const isQmsSdkNotification = (data?: Record<string, unknown>) =>
473
+ data?.origin === 'QMS-SDK';
474
+
156
475
  const unsubscribeOnMessage = messaging().onMessage(async (message) => {
476
+ if (!isQmsSdkNotification(message.data)) {
477
+ return;
478
+ }
157
479
 
158
480
  QmsPlugin.emitInAppNotification({
159
481
  title: message.notification?.title,
@@ -163,11 +485,123 @@ const unsubscribeOnMessage = messaging().onMessage(async (message) => {
163
485
  });
164
486
  ```
165
487
 
166
- Payload:
488
+ ## Background Notification Press
489
+
490
+ When the app is in the background or killed, the client should handle notification presses. If the notification data has `origin: 'QMS-SDK'`, navigate to the screen that renders `QmsDashboardView`.
491
+
492
+ ```tsx
493
+ import messaging from '@react-native-firebase/messaging';
494
+
495
+ const isQmsSdkNotification = (data?: Record<string, unknown>) =>
496
+ data?.origin === 'QMS-SDK';
497
+
498
+ const navigateFromNotification = async (data?: Record<string, unknown>) => {
499
+ if (!isQmsSdkNotification(data)) {
500
+ return;
501
+ }
502
+
503
+ // Replace this with your app route name that renders QmsDashboardView.
504
+ navigationRef.current?.navigate('Dashboard', {
505
+ notificationData: data ?? {},
506
+ });
507
+ };
508
+
509
+ const unsubscribeNotificationOpened = messaging().onNotificationOpenedApp(
510
+ async (message) => {
511
+ await navigateFromNotification(message.data);
512
+ }
513
+ );
514
+
515
+ const initialMessage = await messaging().getInitialNotification();
516
+ if (initialMessage) {
517
+ await navigateFromNotification(initialMessage.data);
518
+ }
519
+ ```
520
+
521
+ If your app requires login before opening QMS, check the stored login state first. If the user is logged in, navigate to the QMS dashboard route. If not, navigate to login and open `QmsDashboardView` after authentication succeeds.
522
+
523
+ ## Background Message Handler
167
524
 
168
- - `title?: string`
169
- - `body?: string`
170
- - `data?: Record<string, unknown>`
525
+ Register a background message handler in your app entry file, such as `index.js`. This handles data received while the app is in the background, but navigation from a notification tap should still be handled with `onNotificationOpenedApp` and `getInitialNotification`.
526
+
527
+ ```tsx
528
+ import { AppRegistry } from 'react-native';
529
+ import messaging from '@react-native-firebase/messaging';
530
+ import App from './App';
531
+ import { name as appName } from './app.json';
532
+
533
+ messaging().setBackgroundMessageHandler(async (message) => {
534
+ console.log('FCM background message:', {
535
+ title: message.notification?.title,
536
+ body: message.notification?.body,
537
+ data: message.data,
538
+ });
539
+ });
540
+
541
+ AppRegistry.registerComponent(appName, () => App);
542
+ ```
543
+
544
+ ## InAppNotificationPayload Props
545
+
546
+ ---
547
+
548
+ ### `title`
549
+
550
+ Notification title. If omitted, the native call receives `Notification`.
551
+
552
+ | Type | Default |
553
+ | --- | --- |
554
+ | `string` | `'Notification'` |
555
+
556
+ Example:
557
+
558
+ ```tsx
559
+ QmsPlugin.emitInAppNotification({
560
+ title: 'Test title',
561
+ });
562
+ ```
563
+
564
+ ---
565
+
566
+ ### `body`
567
+
568
+ Notification body text.
569
+
570
+ | Type | Default |
571
+ | --- | --- |
572
+ | `string` | `''` |
573
+
574
+ Example:
575
+
576
+ ```tsx
577
+ QmsPlugin.emitInAppNotification({
578
+ body: 'Test body',
579
+ });
580
+ ```
581
+
582
+ ---
583
+
584
+ ### `data`
585
+
586
+ Optional notification data payload forwarded to native when supported.
587
+
588
+ | Type | Default |
589
+ | --- | --- |
590
+ | `Record<string, unknown>` | `null` |
591
+
592
+ Example:
593
+
594
+ ```tsx
595
+ QmsPlugin.emitInAppNotification({
596
+ data: {
597
+ type: 'issues_complete',
598
+ show_in_foreground: '1',
599
+ plan_id: '136',
600
+ id_number: '800201065157',
601
+ origin: 'QMS-SDK',
602
+ },
603
+ });
604
+ ```
171
605
 
172
606
  ---
173
607
 
@@ -75,7 +75,7 @@ dependencies {
75
75
  implementation "com.facebook.react:react-android"
76
76
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
77
77
  implementation 'com.facebook.react:react-native:+'
78
- implementation "com.convep.qms:qms-plugin:1.20.4"
78
+ implementation "com.convep.qms:qms-plugin:1.21.0"
79
79
 
80
80
  implementation 'androidx.appcompat:appcompat:1.6.1'
81
81
 
@@ -16,6 +16,7 @@ static NSString * const kQmsRoutePayloadNotification = @"QmsRoutePayloadNotifica
16
16
  @property (nonatomic, copy) NSString *ClientID;
17
17
  @property (nonatomic, copy) NSString *ClientCode;
18
18
  @property (nonatomic, copy) NSString *user_token;
19
+ @property (nonatomic, copy) NSString *pushToken;
19
20
  @property (nonatomic, copy) NSString *themeColor;
20
21
  @property (nonatomic, copy) NSString *headerTextColor;
21
22
  @property (nonatomic, copy) NSString *headerIconColor;
@@ -183,6 +184,11 @@ static NSString * const kQmsRoutePayloadNotification = @"QmsRoutePayloadNotifica
183
184
  [self forwardProp:@"user_token" value:_user_token];
184
185
  }
185
186
 
187
+ - (void)setPushToken:(NSString *)pushToken {
188
+ _pushToken = [pushToken copy];
189
+ [self forwardProp:@"pushToken" value:_pushToken];
190
+ }
191
+
186
192
  - (void)setThemeColor:(NSString *)themeColor {
187
193
  _themeColor = [themeColor copy];
188
194
  [self persistThemeDefaults];
@@ -241,6 +247,7 @@ static NSString * const kQmsRoutePayloadNotification = @"QmsRoutePayloadNotifica
241
247
  [self forwardProp:@"ClientID" value:_ClientID];
242
248
  [self forwardProp:@"ClientCode" value:_ClientCode];
243
249
  [self forwardProp:@"user_token" value:_user_token];
250
+ [self forwardProp:@"pushToken" value:_pushToken];
244
251
  [self forwardProp:@"themeColor" value:_themeColor];
245
252
  [self forwardProp:@"headerTextColor" value:_headerTextColor];
246
253
  [self forwardProp:@"headerIconColor" value:_headerIconColor];
@@ -309,32 +316,95 @@ static NSString * const kQmsRoutePayloadNotification = @"QmsRoutePayloadNotifica
309
316
  return self.dashboardVC.navigationController;
310
317
  }
311
318
 
312
- - (void)pushViewControllerNamed:(NSString *)className {
313
- Class cls = NSClassFromString(className);
314
- if (!cls) return;
315
- UIViewController *vc = [[cls alloc] init];
316
- if (!vc) return;
317
- UINavigationController *nav = [self mainNavigationController];
318
- if (nav) {
319
- [nav pushViewController:vc animated:YES];
319
+ /// Extracts the project name from the notification title.
320
+ /// Titles follow the format: "ProjectName - Some Description"
321
+ /// e.g. "[Demo] Oasis Ara Residency - New Appointment (Joint Inspection)" → "[Demo] Oasis Ara Residency"
322
+ - (NSString *)projectNameFromTitle:(NSString *)title {
323
+ if (title.length == 0) return @"";
324
+ NSRange range = [title rangeOfString:@" - "];
325
+ if (range.location == NSNotFound) return title;
326
+ return [title substringToIndex:range.location];
327
+ }
328
+
329
+ /// Presents a deep-link destination modally from the top-most visible view controller.
330
+ /// This matches how these screens are always presented normally (slide-up modal),
331
+ /// so their built-in onBack → dismissViewControllerAnimated: works correctly.
332
+ - (void)presentDeepLinkVC:(UIViewController *)destinationVC {
333
+ if (!destinationVC) return;
334
+
335
+ // Find the topmost presented VC to present from.
336
+ UIViewController *presenter = self.dashboardVC;
337
+ while (presenter.presentedViewController) {
338
+ presenter = presenter.presentedViewController;
320
339
  }
340
+
341
+ // Use the same slide-modal style the rest of the app uses.
342
+ Class delegateClass = NSClassFromString(@"QmsSlideModalTransitionDelegate");
343
+ if (delegateClass && [delegateClass respondsToSelector:NSSelectorFromString(@"shared")]) {
344
+ @try {
345
+ id delegate = [delegateClass performSelector:NSSelectorFromString(@"shared")];
346
+ destinationVC.modalPresentationStyle = UIModalPresentationCustom;
347
+ destinationVC.transitioningDelegate = delegate;
348
+ } @catch (__unused NSException *e) {
349
+ destinationVC.modalPresentationStyle = UIModalPresentationFullScreen;
350
+ }
351
+ } else {
352
+ destinationVC.modalPresentationStyle = UIModalPresentationFullScreen;
353
+ }
354
+
355
+ [presenter presentViewController:destinationVC animated:YES completion:nil];
356
+ }
357
+
358
+ /// Sets the standard project context properties on a VC using values from the
359
+ /// notification payload. Covers the common projectCode/projectName/projectId
360
+ /// naming used by AppointmentViewMoreViewController and IssuesViewController.
361
+ - (void)applyProjectContext:(UIViewController *)vc payload:(NSDictionary *)payload title:(NSString *)title {
362
+ @try {
363
+ NSString *projectId = [self stringFromPayload:payload key:@"project_id"];
364
+ NSString *projName = [self projectNameFromTitle:title];
365
+ if (projectId.length > 0) [vc setValue:projectId forKey:@"projectId"];
366
+ if (projName.length > 0) [vc setValue:projName forKey:@"projectName"];
367
+ // projectCode is not in the FCM payload; leave it nil — the VCs
368
+ // use it only for display labels and fall back gracefully when absent.
369
+ } @catch (__unused NSException *e) {}
321
370
  }
322
371
 
323
- - (void)pushIssuesViewControllerWithPayload:(NSDictionary *)payload {
372
+ - (void)presentIssuesViewControllerWithPayload:(NSDictionary *)payload title:(NSString *)title {
324
373
  Class cls = NSClassFromString(@"IssuesViewController");
325
374
  if (!cls) return;
326
375
  UIViewController *vc = [[cls alloc] init];
327
376
  if (!vc) return;
377
+ [self applyProjectContext:vc payload:payload title:title];
328
378
  NSString *issueId = [self stringFromPayload:payload key:@"issue_id"];
329
- if (issueId.length > 0 && [vc respondsToSelector:NSSelectorFromString(@"setDeepLinkIssueId:")]) {
330
- @try {
331
- [vc setValue:issueId forKey:@"deepLinkIssueId"];
332
- } @catch (__unused NSException *exception) {}
333
- }
334
- UINavigationController *nav = [self mainNavigationController];
335
- if (nav) {
336
- [nav pushViewController:vc animated:YES];
379
+ if (issueId.length > 0) {
380
+ @try { [vc setValue:issueId forKey:@"deepLinkIssueId"]; }
381
+ @catch (__unused NSException *e) {}
337
382
  }
383
+ [self presentDeepLinkVC:vc];
384
+ }
385
+
386
+ - (void)presentAppointmentViewControllerWithPayload:(NSDictionary *)payload title:(NSString *)title {
387
+ Class cls = NSClassFromString(@"AppointmentViewMoreViewController");
388
+ if (!cls) return;
389
+ UIViewController *vc = [[cls alloc] init];
390
+ if (!vc) return;
391
+ [self applyProjectContext:vc payload:payload title:title];
392
+ [self presentDeepLinkVC:vc];
393
+ }
394
+
395
+ - (void)presentGeneralInfoViewControllerWithPayload:(NSDictionary *)payload title:(NSString *)title {
396
+ Class cls = NSClassFromString(@"GeneralInfoViewController");
397
+ if (!cls) return;
398
+ UIViewController *vc = [[cls alloc] init];
399
+ if (!vc) return;
400
+ // GeneralInfoViewController uses unitID/unitName instead of projectCode/projectName.
401
+ @try {
402
+ NSString *projName = [self projectNameFromTitle:title];
403
+ NSString *projectId = [self stringFromPayload:payload key:@"project_id"];
404
+ if (projName.length > 0) [vc setValue:projName forKey:@"unitName"];
405
+ if (projectId.length > 0) [vc setValue:projectId forKey:@"unitID"];
406
+ } @catch (__unused NSException *e) {}
407
+ [self presentDeepLinkVC:vc];
338
408
  }
339
409
 
340
410
  - (void)routePayloadIfNeeded:(NSDictionary *)payload force:(BOOL)force {
@@ -345,26 +415,23 @@ static NSString * const kQmsRoutePayloadNotification = @"QmsRoutePayloadNotifica
345
415
  _didRouteInitialPayload = YES;
346
416
  [self applyPayloadContext:payload];
347
417
 
348
- NSString *type = [self stringFromPayload:payload key:@"type"];
349
- NSLog(@"🧭 routePayloadIfNeeded type=%@ issue_id=%@ plan_id=%@ project_id=%@",
350
- type ?: @"", [self stringFromPayload:payload key:@"issue_id"] ?: @"",
418
+ NSString *type = [self stringFromPayload:payload key:@"type"];
419
+ NSString *title = [self stringFromPayload:payload key:@"title"];
420
+ NSLog(@"🧭 routePayloadIfNeeded type=%@ project_id=%@ plan_id=%@ title=%@",
421
+ type ?: @"",
422
+ [self stringFromPayload:payload key:@"project_id"] ?: @"",
351
423
  [self stringFromPayload:payload key:@"plan_id"] ?: @"",
352
- [self stringFromPayload:payload key:@"project_id"] ?: @"");
424
+ title ?: @"");
425
+
353
426
  if ([self isIssueType:type]) {
354
- NSString *issueId = [self stringFromPayload:payload key:@"issue_id"];
355
- if (issueId.length > 0) {
356
- NSLog(@"🧭 routing issue deep link to IssuesViewController issue_id=%@", issueId);
357
- [self pushIssuesViewControllerWithPayload:payload];
358
- } else {
359
- NSLog(@"🧭 routing issue type without issue_id to IssuesViewController");
360
- [self pushViewControllerNamed:@"IssuesViewController"];
361
- }
427
+ NSLog(@"🧭 routing issue type IssuesViewController");
428
+ [self presentIssuesViewControllerWithPayload:payload title:title ?: @""];
362
429
  } else if ([self isAppointmentType:type]) {
363
- NSLog(@"🧭 routing appointment type to AppointmentViewController");
364
- [self pushViewControllerNamed:@"AppointmentViewController"];
430
+ NSLog(@"🧭 routing appointment type AppointmentViewMoreViewController");
431
+ [self presentAppointmentViewControllerWithPayload:payload title:title ?: @""];
365
432
  } else if ([type isEqualToString:@"clearance_letter"]) {
366
- NSLog(@"🧭 routing clearance_letter to GeneralInfoViewController");
367
- [self pushViewControllerNamed:@"GeneralInfoViewController"];
433
+ NSLog(@"🧭 routing clearance_letter GeneralInfoViewController");
434
+ [self presentGeneralInfoViewControllerWithPayload:payload title:title ?: @""];
368
435
  } else {
369
436
  NSLog(@"🧭 no route matched for type=%@", type ?: @"");
370
437
  }
@@ -630,6 +697,7 @@ RCT_EXPORT_MODULE(QmsDashboardView)
630
697
  RCT_EXPORT_VIEW_PROPERTY(ClientID, NSString)
631
698
  RCT_EXPORT_VIEW_PROPERTY(ClientCode, NSString)
632
699
  RCT_EXPORT_VIEW_PROPERTY(user_token, NSString)
700
+ RCT_EXPORT_VIEW_PROPERTY(pushToken, NSString)
633
701
  RCT_EXPORT_VIEW_PROPERTY(themeColor, NSString)
634
702
  RCT_EXPORT_VIEW_PROPERTY(headerTextColor, NSString)
635
703
  RCT_EXPORT_VIEW_PROPERTY(headerIconColor, NSString)
@@ -6,7 +6,7 @@
6
6
  <dict>
7
7
  <key>Assets.car</key>
8
8
  <data>
9
- 20Yu6bRRQvDB5rSO/jNOaFOZBg8=
9
+ MTfQvIZWCF4Xc///4gPvnfKvkoo=
10
10
  </data>
11
11
  <key>Headers/QmsPlugin.h</key>
12
12
  <data>
@@ -46,7 +46,7 @@
46
46
  </data>
47
47
  <key>en.json</key>
48
48
  <data>
49
- 4Tqlnsl9cvRAJ3mMAQNj1MokMPA=
49
+ IGQvnjozrCub5gEn7f1jJAT74LQ=
50
50
  </data>
51
51
  </dict>
52
52
  <key>files2</key>
@@ -55,7 +55,7 @@
55
55
  <dict>
56
56
  <key>hash2</key>
57
57
  <data>
58
- /DXEZyDnoJiDum9XvkAIDWaIYS9RtuEbIiC8hqHZuxM=
58
+ KdQXHwAZmi0wI1JKxap44sKqRAwy3jq3J7ZeeKJVd/s=
59
59
  </data>
60
60
  </dict>
61
61
  <key>Headers/QmsPlugin.h</key>
@@ -118,7 +118,7 @@
118
118
  <dict>
119
119
  <key>hash2</key>
120
120
  <data>
121
- 3gHzwkpXeTuAPWs/zdPLAma6GZdL51xbjVc4VR+WSrk=
121
+ rtEXZXzsEOrX9qnfJjH3Fyd4FBNyhJocaDHY1YSFk3k=
122
122
  </data>
123
123
  </dict>
124
124
  </dict>
@@ -430,7 +430,7 @@
430
430
  "ACCESS_ITEM": "Access Item",
431
431
  "DISPLAY_ITEM": "Displaying item(s)",
432
432
  "FILTER_CAPTION": "Select option to filter listing",
433
- "SEARCH_BY_REFERENCE": "Search Reference Number/ Location",
433
+ "SEARCH_BY_REFERENCE": "Search Reference No./ Location",
434
434
  "BY": "By",
435
435
  "OWNER_ACCEPTANCE_FORM": "Owner Acceptance Form",
436
436
  "SUBMITTED_ON": "Submitted on",
@@ -6,7 +6,7 @@
6
6
  <dict>
7
7
  <key>Assets.car</key>
8
8
  <data>
9
- 20Yu6bRRQvDB5rSO/jNOaFOZBg8=
9
+ MTfQvIZWCF4Xc///4gPvnfKvkoo=
10
10
  </data>
11
11
  <key>Headers/QmsPlugin.h</key>
12
12
  <data>
@@ -46,7 +46,7 @@
46
46
  </data>
47
47
  <key>en.json</key>
48
48
  <data>
49
- 4Tqlnsl9cvRAJ3mMAQNj1MokMPA=
49
+ IGQvnjozrCub5gEn7f1jJAT74LQ=
50
50
  </data>
51
51
  </dict>
52
52
  <key>files2</key>
@@ -55,7 +55,7 @@
55
55
  <dict>
56
56
  <key>hash2</key>
57
57
  <data>
58
- /DXEZyDnoJiDum9XvkAIDWaIYS9RtuEbIiC8hqHZuxM=
58
+ KdQXHwAZmi0wI1JKxap44sKqRAwy3jq3J7ZeeKJVd/s=
59
59
  </data>
60
60
  </dict>
61
61
  <key>Headers/QmsPlugin.h</key>
@@ -118,7 +118,7 @@
118
118
  <dict>
119
119
  <key>hash2</key>
120
120
  <data>
121
- 3gHzwkpXeTuAPWs/zdPLAma6GZdL51xbjVc4VR+WSrk=
121
+ rtEXZXzsEOrX9qnfJjH3Fyd4FBNyhJocaDHY1YSFk3k=
122
122
  </data>
123
123
  </dict>
124
124
  </dict>
@@ -430,7 +430,7 @@
430
430
  "ACCESS_ITEM": "Access Item",
431
431
  "DISPLAY_ITEM": "Displaying item(s)",
432
432
  "FILTER_CAPTION": "Select option to filter listing",
433
- "SEARCH_BY_REFERENCE": "Search Reference Number/ Location",
433
+ "SEARCH_BY_REFERENCE": "Search Reference No./ Location",
434
434
  "BY": "By",
435
435
  "OWNER_ACCEPTANCE_FORM": "Owner Acceptance Form",
436
436
  "SUBMITTED_ON": "Submitted on",
@@ -82,6 +82,7 @@ export const QmsDashboardView = ({
82
82
  QmsModule.setFontFamily(fontFamily ?? '');
83
83
  }
84
84
  if (QmsModule?.setPushToken) {
85
+ console.log('[QMS_OWNER_SDK] forwarding pushToken to native:', pushToken ?? '');
85
86
  QmsModule.setPushToken(pushToken ?? '');
86
87
  }
87
88
  }, [themeColor, headerThemeColor, headerTextColor, headerIconColor, accentColor, fontFamily, pushToken]);
@@ -1 +1 @@
1
- {"version":3,"names":["React","useEffect","DeviceEventEmitter","NativeModules","View","jsx","_jsx","QmsModule","QmsDashboardView","style","onClose","onLogout","onActiveAccountChange","onAnalyticsScreen","onAnalyticsEvent","onLocate","clientID","clientCode","ClientID","ClientCode","user_token","token","userToken","pushToken","autoShow","themeColor","headerThemeColor","headerTextColor","headerIconColor","accentColor","fontFamily","isOrigin","payload","resolvedClientID","resolvedClientCode","resolvedToken","hasPayload","Object","keys","length","showQms","setPrimaryColor","resolvedHeaderColor","setHeaderTextColor","resolvedHeaderIconColor","setHeaderIconColor","setAccentColor","setFontFamily","showQmsWithPayload","setPushToken","subscription","addListener","remove","event","screenName","screenClass","eventName","params","lat","lng"],"sourceRoot":"../../src","sources":["QmsDashboardView.android.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,kBAAkB,EAAEC,aAAa,EAAEC,IAAI,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAMvE,MAAM;EAAEC;AAAU,CAAC,GAAGJ,aAsBrB;AAED,OAAO,MAAMK,gBAAiD,GAAGA,CAAC;EAChEC,KAAK;EACLC,OAAO;EACPC,QAAQ;EACRC,qBAAqB;EACrBC,iBAAiB;EACjBC,gBAAgB;EAChBC,QAAQ;EACRC,QAAQ;EACRC,UAAU;EACVC,QAAQ;EACRC,UAAU;EACVC,UAAU;EACVC,KAAK;EACLC,SAAS;EACTC,SAAS;EACTC,QAAQ,GAAG,IAAI;EACf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M;IACd,IAAI,CAACa,gBAAgB,EAAE;IACvB,MAAMoC,YAAY,GAAGhD,kBAAkB,CAACiD,WAAW,CACjD,wBAAwB,EACvBE,KAAgE,IAC/DvC,gBAAgB,CAACuC,KAAK,EAAEG,SAAS,EAAEH,KAAK,EAAEI,MAAM,IAAI,IAAI,CAC5D,CAAC;IACD,OAAO,MAAMP,YAAY,CAACE,MAAM,CAAC,CAAC;EACpC,CAAC,EAAE,CAACtC,gBAAgB,CAAC,CAAC;EACtBb,SAAS,CAAC,MAAM;IACd,IAAI,CAACc,QAAQ,EAAE;IACf,MAAMmC,YAAY,GAAGhD,kBAAkB,CAACiD,WAAW,CACjD,gBAAgB,EACfE,KAAsC,IACrCtC,QAAQ,CAACsC,KAAK,EAAEK,GAAG,EAAEL,KAAK,EAAEM,GAAG,CACnC,CAAC;IACD,OAAO,MAAMT,YAAY,CAACE,MAAM,CAAC,CAAC;EACpC,CAAC,EAAE,CAACrC,QAAQ,CAAC,CAAC;EACd;EACA;EACA,oBAAOT,IAAA,CAACF,IAAI;IAACK,KAAK,EAAEA;EAAM,CAAE,CAAC;AAC/B,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useEffect","DeviceEventEmitter","NativeModules","View","jsx","_jsx","QmsModule","QmsDashboardView","style","onClose","onLogout","onActiveAccountChange","onAnalyticsScreen","onAnalyticsEvent","onLocate","clientID","clientCode","ClientID","ClientCode","user_token","token","userToken","pushToken","autoShow","themeColor","headerThemeColor","headerTextColor","headerIconColor","accentColor","fontFamily","isOrigin","payload","resolvedClientID","resolvedClientCode","resolvedToken","hasPayload","Object","keys","length","showQms","setPrimaryColor","resolvedHeaderColor","setHeaderTextColor","resolvedHeaderIconColor","setHeaderIconColor","setAccentColor","setFontFamily","showQmsWithPayload","setPushToken","console","log","subscription","addListener","remove","event","screenName","screenClass","eventName","params","lat","lng"],"sourceRoot":"../../src","sources":["QmsDashboardView.android.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,QA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msDashboardView = props => {
21
21
  user_token,
22
22
  userToken,
23
23
  token,
24
+ pushToken,
24
25
  isOrigin = false,
25
26
  // autoShow is Android-only; ignored on iOS
26
27
  themeColor,
@@ -35,6 +36,7 @@ export const QmsDashboardView = props => {
35
36
  const resolvedClientID = clientID ?? ClientID ?? '';
36
37
  const resolvedClientCode = clientCode ?? ClientCode ?? '';
37
38
  const resolvedToken = user_token ?? token ?? userToken ?? '';
39
+ const resolvedPushToken = pushToken ?? '';
38
40
  const resolvedHeaderColor = headerThemeColor ?? headerTextColor ?? '';
39
41
  const resolvedHeaderIconColor = headerThemeColor ?? headerIconColor ?? '';
40
42
  useEffect(() => {
@@ -77,6 +79,7 @@ export const QmsDashboardView = props => {
77
79
  ClientID: resolvedClientID,
78
80
  ClientCode: resolvedClientCode,
79
81
  user_token: resolvedToken,
82
+ pushToken: resolvedPushToken,
80
83
  isOrigin: isOrigin,
81
84
  themeColor: themeColor,
82
85
  headerTextColor: resolvedHeaderColor,
@@ -1 +1 @@
1
- {"version":3,"names":["React","useEffect","DeviceEventEmitter","NativeEventEmitter","NativeModules","requireNativeComponent","jsx","_jsx","NativeQmsDashboardView","QmsDashboardView","props","onClose","onLogout","onActiveAccountChange","onAnalyticsScreen","onAnalyticsEvent","clientID","clientCode","ClientID","ClientCode","user_token","userToken","token","isOrigin","themeColor","headerThemeColor","headerTextColor","headerIconColor","accentColor","fontFamily","payload","rest","resolvedClientID","resolvedClientCode","resolvedToken","resolvedHeaderColor","resolvedHeaderIconColor","module","QmsModule","setPrimaryColor","setHeaderTextColor","setHeaderIconColor","setAccentColor","setFontFamily","nativeEmitterModule","QmsDashboardEmitter","emitter","subscriptions","push","addListener","raw","forEach","sub","remove","subscription","screenName","screenClass","eventName","params"],"sourceRoot":"../../src","sources":["QmsDashboardView.ios.tsx"],"mappings":";;AAAA;;AAEA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SACEC,kBAAkB,EAClBC,kBAAkB,EAClBC,aAAa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AAC,CAAC;EAEvBb,SAAS,CAAC,MAAM;IACd,IAAI,CAACc,gBAAgB,EAAE;IACvB,MAAMuC,YAAY,GAAGpD,kBAAkB,CAAC+C,WAAW,CACjD,wBAAwB,EACvBnB,OAAkE,IACjEf,gBAAgB,CAACe,OAAO,EAAE2B,SAAS,EAAE3B,OAAO,EAAE4B,MAAM,IAAI,IAAI,CAChE,CAAC;IACD,OAAO,MAAMJ,YAAY,CAACD,MAAM,CAAC,CAAC;EACpC,CAAC,EAAE,CAACtC,gBAAgB,CAAC,CAAC;EAEtB,oBACER,IAAA,CAACC,sBAAsB;IAAA,GACjBuB,IAAI;IACRb,QAAQ,EAAEc,gBAAiB;IAC3Bb,UAAU,EAAEc,kBAAmB;IAC/Bb,UAAU,EAAEc,aAAc;IAC1BX,QAAQ,EAAEA,QAAS;IACnBC,UAAU,EAAEA,UAAW;IACvBE,eAAe,EAAES,mBAAoB;IACrCR,eAAe,EAAES,uBAAwB;IACzCR,WAAW,EAAEA,WAAY;IACzBC,UAAU,EAAEA,UAAW;IACvBC,OAAO,EAAEA,OAAO,IAAI;EAAK,CAC1B,CAAC;AAEN,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useEffect","DeviceEventEmitter","NativeEventEmitter","NativeModules","requireNativeComponent","jsx","_jsx","NativeQmsDashboardView","QmsDashboardView","props","onClose","onLogout","onActiveAccountChange","onAnalyticsScreen","onAnalyticsEvent","clientID","clientCode","ClientID","ClientCode","user_token","userToken","token","pushToken","isOrigin","themeColor","headerThemeColor","headerTextColor","headerIconColor","accentColor","fontFamily","payload","rest","resolvedClientID","resolvedClientCode","resolvedToken","resolvedPushToken","resolvedHeaderColor","resolvedHeaderIconColor","module","QmsModule","setPrimaryColor","setHeaderTextColor","setHeaderIconColor","setAccentColor","setFontFamily","nativeEmitterModule","QmsDashboardEmitter","emitter","subscriptions","push","addListener","raw","forEach","sub","remove","subscription","screenName","screenClass","eventName","params"],"sourceRoot":"../../src","sources":["QmsDashboardView.ios.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B,OAAuD,IACtDjB,iBAAiB,CAACiB,OAAO,EAAE0B,UAAU,EAAE1B,OAAO,EAAE2B,WAAW,CAC/D,CAAC;IACD,OAAO,MAAMF,YAAY,CAACD,MAAM,CAAC,CAAC;EACpC,CAAC,EAAE,CAACzC,iBAAiB,CAAC,CAAC;EAEvBb,SAAS,CAAC,MAAM;IACd,IAAI,CAACc,gBAAgB,EAAE;IACvB,MAAMyC,YAAY,GAAGtD,kBAAkB,CAACiD,WAAW,CACjD,wBAAwB,EACvBpB,OAAkE,IACjEhB,gBAAgB,CAACgB,OAAO,EAAE4B,SAAS,EAAE5B,OAAO,EAAE6B,MAAM,IAAI,IAAI,CAChE,CAAC;IACD,OAAO,MAAMJ,YAAY,CAACD,MAAM,CAAC,CAAC;EACpC,CAAC,EAAE,CAACxC,gBAAgB,CAAC,CAAC;EAEtB,oBACER,IAAA,CAACC,sBAAsB;IAAA,GACjBwB,IAAI;IACRd,QAAQ,EAAEe,gBAAiB;IAC3Bd,UAAU,EAAEe,kBAAmB;IAC/Bd,UAAU,EAAEe,aAAc;IAC1BZ,SAAS,EAAEa,iBAAkB;IAC7BZ,QAAQ,EAAEA,QAAS;IACnBC,UAAU,EAAEA,UAAW;IACvBE,eAAe,EAAEU,mBAAoB;IACrCT,eAAe,EAAEU,uBAAwB;IACzCT,WAAW,EAAEA,WAAY;IACzBC,UAAU,EAAEA,UAAW;IACvBC,OAAO,EAAEA,OAAO,IAAI;EAAK,CAC1B,CAAC;AAEN,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"QmsDashboardView.android.d.ts","sourceRoot":"","sources":["../../../src/QmsDashboardView.android.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAEzC,OAAO,KAAK,EAEV,qBAAqB,EACtB,MAAM,0BAA0B,CAAC;AA0BlC,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA+K5D,CAAC"}
1
+ {"version":3,"file":"QmsDashboardView.android.d.ts","sourceRoot":"","sources":["../../../src/QmsDashboardView.android.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAEzC,OAAO,KAAK,EAEV,qBAAqB,EACtB,MAAM,0BAA0B,CAAC;AA0BlC,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAgL5D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"QmsDashboardView.ios.d.ts","sourceRoot":"","sources":["../../../src/QmsDashboardView.ios.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAOzC,OAAO,KAAK,EAEV,qBAAqB,EACtB,MAAM,0BAA0B,CAAC;AAMlC,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAkH5D,CAAC"}
1
+ {"version":3,"file":"QmsDashboardView.ios.d.ts","sourceRoot":"","sources":["../../../src/QmsDashboardView.ios.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAOzC,OAAO,KAAK,EAEV,qBAAqB,EACtB,MAAM,0BAA0B,CAAC;AAMlC,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAqH5D,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@convep_mobilogy/react-native-qms-plugin",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "To handle defect managment",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -135,6 +135,7 @@ export const QmsDashboardView: React.FC<QmsDashboardViewProps> = ({
135
135
  QmsModule.setFontFamily(fontFamily ?? '');
136
136
  }
137
137
  if (QmsModule?.setPushToken) {
138
+ console.log('[QMS_OWNER_SDK] forwarding pushToken to native:', pushToken ?? '');
138
139
  QmsModule.setPushToken(pushToken ?? '');
139
140
  }
140
141
  }, [
@@ -30,6 +30,7 @@ export const QmsDashboardView: React.FC<QmsDashboardViewProps> = (props) => {
30
30
  user_token,
31
31
  userToken,
32
32
  token,
33
+ pushToken,
33
34
  isOrigin = false,
34
35
  // autoShow is Android-only; ignored on iOS
35
36
  themeColor,
@@ -45,6 +46,7 @@ export const QmsDashboardView: React.FC<QmsDashboardViewProps> = (props) => {
45
46
  const resolvedClientID = clientID ?? ClientID ?? '';
46
47
  const resolvedClientCode = clientCode ?? ClientCode ?? '';
47
48
  const resolvedToken = user_token ?? token ?? userToken ?? '';
49
+ const resolvedPushToken = pushToken ?? '';
48
50
  const resolvedHeaderColor = headerThemeColor ?? headerTextColor ?? '';
49
51
  const resolvedHeaderIconColor = headerThemeColor ?? headerIconColor ?? '';
50
52
 
@@ -121,6 +123,7 @@ export const QmsDashboardView: React.FC<QmsDashboardViewProps> = (props) => {
121
123
  ClientID={resolvedClientID}
122
124
  ClientCode={resolvedClientCode}
123
125
  user_token={resolvedToken}
126
+ pushToken={resolvedPushToken}
124
127
  isOrigin={isOrigin}
125
128
  themeColor={themeColor}
126
129
  headerTextColor={resolvedHeaderColor}