@abihealth/goapp-react-native 1.35.0 → 1.36.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.36.0](https://github.com/abiglobalhealth/react-native-sdk/compare/goapp-react-native-v1.35.0...goapp-react-native-v1.36.0) (2025-06-27)
4
+
5
+
6
+ ### Features
7
+
8
+ * add district label retrieval in delivery address submission ([#214](https://github.com/abiglobalhealth/react-native-sdk/issues/214)) ([78227d0](https://github.com/abiglobalhealth/react-native-sdk/commit/78227d0825aa6e064abad1d8b12e019acd2b15aa))
9
+
3
10
  ## [1.35.0](https://github.com/abiglobalhealth/react-native-sdk/compare/goapp-react-native-v1.34.0...goapp-react-native-v1.35.0) (2025-06-25)
4
11
 
5
12
 
@@ -191,14 +191,23 @@ var DeliveryAddressScreen = function (_a) {
191
191
  var _b = (0, react_1.useState)(false), loading = _b[0], setLoading = _b[1];
192
192
  var _c = (0, react_1.useState)(false), error = _c[0], setError = _c[1];
193
193
  var onSubmit = function (data) { return __awaiter(void 0, void 0, void 0, function () {
194
- var e_1;
194
+ var getDistrictLabel, e_1;
195
195
  return __generator(this, function (_a) {
196
196
  switch (_a.label) {
197
197
  case 0:
198
198
  _a.trys.push([0, 2, , 3]);
199
199
  setError(false);
200
200
  setLoading(true);
201
- return [4 /*yield*/, (0, video_1.updateDeliveryAddress)(consultation === null || consultation === void 0 ? void 0 : consultation.id, __assign(__assign({}, data), { country: t('country.hk') }))];
201
+ getDistrictLabel = function (districtKey) {
202
+ for (var _i = 0, DISTRICT_AREAS_1 = deliveryAddress_1.DISTRICT_AREAS; _i < DISTRICT_AREAS_1.length; _i++) {
203
+ var group = DISTRICT_AREAS_1[_i];
204
+ var found = group.areas.find(function (a) { return a.key === districtKey; });
205
+ if (found)
206
+ return t("country.hk.area.".concat(group.key, ".district.").concat(found.key));
207
+ }
208
+ return districtKey;
209
+ };
210
+ return [4 /*yield*/, (0, video_1.updateDeliveryAddress)(consultation === null || consultation === void 0 ? void 0 : consultation.id, __assign(__assign({}, data), { country: t('country.hk'), district: getDistrictLabel(data.district) }))];
202
211
  case 1:
203
212
  _a.sent();
204
213
  return [3 /*break*/, 3];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abihealth/goapp-react-native",
3
- "version": "1.35.0",
3
+ "version": "1.36.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org/"