Skip to content

Commit

Permalink
v7.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
agordn52 committed Apr 23, 2024
1 parent 5d04b71 commit 8bd82fa
Show file tree
Hide file tree
Showing 22 changed files with 255 additions and 39 deletions.
6 changes: 6 additions & 0 deletions LabelStoreMax/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [7.4.0] - 2024-04-23

* Ability to add order notes
* Add new translations
* Pubspec.yaml dependency updates

## [7.3.2] - 2024-04-12

* Update env file
Expand Down
4 changes: 4 additions & 0 deletions LabelStoreMax/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
928C71BE2BD7772B00C15E45 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 928C71BD2BD7772B00C15E45 /* PrivacyInfo.xcprivacy */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
Expand Down Expand Up @@ -57,6 +58,7 @@
8362715010B1DC025B396ED3 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
8DD46F1E543D90202726C03D /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
925D64452BA7F98500C41197 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
928C71BD2BD7772B00C15E45 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -162,6 +164,7 @@
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
928C71BD2BD7772B00C15E45 /* PrivacyInfo.xcprivacy */,
);
path = Runner;
sourceTree = "<group>";
Expand Down Expand Up @@ -264,6 +267,7 @@
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
928C71BE2BD7772B00C15E45 /* PrivacyInfo.xcprivacy in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
41 changes: 41 additions & 0 deletions LabelStoreMax/ios/Runner/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>35F9.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>85F4.1</string>
</array>
</dict>
</array>
</dict>
</plist>
4 changes: 4 additions & 0 deletions LabelStoreMax/lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,5 +239,9 @@
"Invalid email address": "Ungültige E-Mail-Adresse",
"By completing this order, I agree to all": "Mit Abschluss dieser Bestellung stimme ich allem zu",
"Change language": "Sprache ändern",
"Order Note": "Bestellhinweis",
"Save Note": "Notiz speichern",
"Enter order note": "Bestellnotiz eingeben",
"Order note must be less than 100 characters": "Die Bestellnotiz muss weniger als 100 Zeichen lang sein",
"Select your language": "Wähle deine Sprache"
}
4 changes: 4 additions & 0 deletions LabelStoreMax/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,5 +239,9 @@
"Invalid email address": "Invalid email address",
"By completing this order, I agree to all": "By completing this order, I agree to all",
"Change language": "Change language",
"Order Note": "Order Note",
"Save Note": "Save Note",
"Enter order note": "Enter order note",
"Order note must be less than 100 characters": "Order note must be less than 100 characters",
"Select your language": "Select your language"
}
4 changes: 4 additions & 0 deletions LabelStoreMax/lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,5 +239,9 @@
"Invalid email address": "Dirección de correo electrónico no válida",
"By completing this order, I agree to all": "Al completar este pedido, acepto todos",
"Change language": "Cambiar idioma",
"Order Note": "Nota de pedido",
"Save Note": "Guardar nota",
"Enter order note": "Introducir nota de pedido",
"Order note must be less than 100 characters": "La nota del pedido debe tener menos de 100 caracteres.",
"Select your language": "elige tu idioma"
}
4 changes: 4 additions & 0 deletions LabelStoreMax/lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,5 +239,9 @@
"Invalid email address": "Adresse e-mail invalide",
"By completing this order, I agree to all": "En remplissant cette commande, j'accepte toutes",
"Change language": "Changer de langue",
"Order Note": "Remarque sur la commande",
"Save Note": "Enregistrer la note",
"Enter order note": "Saisir le bon de commande",
"Order note must be less than 100 characters": "Le bon de commande doit comporter moins de 100 caractères",
"Select your language": "choisissez votre langue"
}
4 changes: 4 additions & 0 deletions LabelStoreMax/lang/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,5 +239,9 @@
"Invalid email address": "amaany eemel pata",
"By completing this order, I agree to all": "is aadesh ko poora karake, main sabhee ke lie sahamat hoon",
"Change language": "bhaasha badalen",
"Order Note": "aadesh not",
"Save Note": "not sahejen",
"Enter order note": "ordar not darj karen",
"Order note must be less than 100 characters": "ordar not 100 aksharon se kam hona chaahie",
"Select your language": "apanee bhaasha ka chayan karen"
}
4 changes: 4 additions & 0 deletions LabelStoreMax/lang/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,5 +239,9 @@
"Invalid email address": "alamat email salah",
"By completing this order, I agree to all": "Dengan menyelesaikan pesanan ini, saya menyetujui semuanya",
"Change language": "Ganti BAHASA",
"Order Note": "Catatan Pesanan",
"Save Note": "Simpan Catatan",
"Enter order note": "Masukkan catatan pesanan",
"Order note must be less than 100 characters": "Catatan pesanan harus kurang dari 100 karakter",
"Select your language": "Pilih bahasamu"
}
4 changes: 4 additions & 0 deletions LabelStoreMax/lang/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,5 +239,9 @@
"Invalid email address": "indirizzo email non valido",
"By completing this order, I agree to all": "Completando questo ordine, accetto tutto",
"Change language": "Cambia lingua",
"Order Note": "Nota sull'ordine",
"Save Note": "Salva nota",
"Enter order note": "Inserisci la nota dell'ordine",
"Order note must be less than 100 characters": "La nota dell'ordine deve contenere meno di 100 caratteri",
"Select your language": "seleziona la tua lingua"
}
4 changes: 4 additions & 0 deletions LabelStoreMax/lang/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,5 +239,9 @@
"Invalid email address": "Ongeldig e-mailadres",
"By completing this order, I agree to all": "Door deze bestelling te voltooien, ga ik akkoord met alles",
"Change language": "Taal wijzigen",
"Order Note": "Bestelnotitie",
"Save Note": "Bewaar notitie",
"Enter order note": "Bestelnotitie invoeren",
"Order note must be less than 100 characters": "Bestelnotitie moet minder dan 100 tekens lang zijn",
"Select your language": "Selecteer je taal"
}
4 changes: 4 additions & 0 deletions LabelStoreMax/lang/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,5 +239,9 @@
"Invalid email address": "Endereço de email invalido",
"By completing this order, I agree to all": "Ao concluir este pedido, concordo com todos",
"Change language": "Mudar idioma",
"Order Note": "Nota de pedido",
"Save Note": "Salvar nota",
"Enter order note": "Insira a nota do pedido",
"Order note must be less than 100 characters": "A nota do pedido deve ter menos de 100 caracteres",
"Select your language": "selecione sua lingua"
}
4 changes: 4 additions & 0 deletions LabelStoreMax/lang/th.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,5 +239,9 @@
"Invalid email address": "ที่อยู่อีเมลที่ไม่ถูกต้อง",
"By completing this order, I agree to all": "เมื่อดำเนินการตามคำสั่งซื้อนี้เสร็จสิ้น ฉันยอมรับทุกประการ",
"Change language": "เปลี่ยนภาษา",
"Order Note": "หมายเหตุการสั่งซื้อ",
"Save Note": "บันทึกหมายเหตุ",
"Enter order note": "ป้อนบันทึกการสั่งซื้อ",
"Order note must be less than 100 characters": "หมายเหตุการสั่งซื้อต้องมีอักขระน้อยกว่า 100 ตัว",
"Select your language": "เลือกภาษาของคุณ"
}
4 changes: 4 additions & 0 deletions LabelStoreMax/lang/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,5 +239,9 @@
"Invalid email address": "Geçersiz e-posta adresi",
"By completing this order, I agree to all": "Bu siparişi tamamlayarak, tümünü kabul ediyorum",
"Change language": "Dili değiştir",
"Order Note": "Sipariş Notu",
"Save Note": "Notu Kaydet",
"Enter order note": "Sipariş notunu girin",
"Order note must be less than 100 characters": "Sipariş notu 100 karakterden az olmalıdır",
"Select your language": "Dilinizi seçiniz"
}
4 changes: 4 additions & 0 deletions LabelStoreMax/lang/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,5 +239,9 @@
"Invalid email address": "无效的邮件地址",
"By completing this order, I agree to all": "通过完成此订单,我同意所有",
"Change language": "改变语言",
"Order Note": "订单备注",
"Save Note": "保存备注",
"Enter order note": "输入订单备注",
"Order note must be less than 100 characters": "订单备注必须少于 100 个字符",
"Select your language": "选择你的语言"
}
1 change: 1 addition & 0 deletions LabelStoreMax/lib/app/models/checkout_session.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class CheckoutSession {
ShippingType? shippingType;
PaymentType? paymentType;
Coupon? coupon;
String? customerNote;

void initSession() {
billingDetails = BillingDetails();
Expand Down
4 changes: 4 additions & 0 deletions LabelStoreMax/lib/bootstrap/data/order_wc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,9 @@ Future<OrderWC> buildOrderWC({TaxRate? taxRate, bool markPaid = true}) async {
orderWC.couponLines!.add(couponLine);
}

if (checkoutSession.customerNote != null && checkoutSession.customerNote!.isNotEmpty) {
orderWC.customerNote = checkoutSession.customerNote;
}

return orderWC;
}
2 changes: 1 addition & 1 deletion LabelStoreMax/lib/config/payment_gateways.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import 'package:nylo_framework/nylo_framework.dart';
| Docs here: https://woosignal.com/docs/app/label-storemax
|-------------------------------------------------------------------------- */

const appPaymentGateways = [];
const appPaymentGateways = ["CashOnDelivery"];
// Available: "Stripe", "CashOnDelivery", "PayPal", "RazorPay"
// e.g. appPaymentGateways = ["Stripe", "CashOnDelivery"]; will only use Stripe and Cash on Delivery.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import 'package:collection/collection.dart' show IterableExtension;
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import '/resources/widgets/checkout_customer_note_widget.dart';
import '/app/models/cart.dart';
import '/app/models/checkout_session.dart';
import '/app/models/customer_country.dart';
Expand Down Expand Up @@ -231,6 +232,7 @@ class CheckoutConfirmationPageState extends NyState<CheckoutConfirmationPage> {
context: context,
checkoutSession: checkoutSession,
),
CheckoutCustomerNote(checkoutSession: checkoutSession),
Container(
decoration: BoxDecoration(
boxShadow: wsBoxShadow(),
Expand Down
110 changes: 110 additions & 0 deletions LabelStoreMax/lib/resources/widgets/checkout_customer_note_widget.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
import 'package:flutter/material.dart';
import 'package:flutter_app/app/models/checkout_session.dart';
import 'package:flutter_app/resources/pages/checkout_confirmation_page.dart';
import 'package:flutter_app/resources/widgets/buttons.dart';
import 'package:nylo_framework/nylo_framework.dart';

class CheckoutCustomerNote extends StatelessWidget {
CheckoutCustomerNote({super.key, required this.checkoutSession}) {
textEditingController.text = checkoutSession.customerNote ?? "";
}

final CheckoutSession checkoutSession;
final TextEditingController textEditingController = TextEditingController();

@override
Widget build(BuildContext context) {
bool hasCustomerNote = checkoutSession.customerNote != null;
return Container(
height: 50,
width: double.infinity,
padding: EdgeInsets.symmetric(vertical: 5),
child: InkWell(
onTap: () => _actionCustomerNote(context),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Text(
hasCustomerNote
? "${'Order Note'.tr()}: ${checkoutSession.customerNote ?? ""}"
: 'Order Note'.tr(),
style: Theme.of(context).textTheme.titleSmall,
overflow: TextOverflow.ellipsis,
maxLines: 2,
),
),
if (hasCustomerNote == true)
IconButton(
padding: EdgeInsets.symmetric(vertical: 3),
onPressed: _removeCustomerNote,
icon: Icon(
Icons.close,
size: 19,
)),
],
).paddingSymmetric(horizontal: 16),
),
);
}

_actionCustomerNote(BuildContext context) {
// open modal to add customer note
showModalBottomSheet<void>(
isScrollControlled: true,
context: context,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(30.0),
topRight: Radius.circular(30.0),
),
),
builder: (BuildContext context) {
return SafeArea(
minimum: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
child: Padding(
padding: MediaQuery.of(context).viewInsets,
child: Container(
child: Wrap(
spacing: 20,
children: <Widget>[
TextFormField(
autofocus: true,
maxLines: 3,
controller: textEditingController,
decoration: InputDecoration(
labelText: "Order Note".tr(),
hintText: "Enter order note".tr(),
),
onChanged: (value) {
CheckoutSession.getInstance.customerNote = value;
},
),
Padding(padding: EdgeInsets.only(top: 16)),
PrimaryButton(title: "Save Note".tr(), action: () {
if (CheckoutSession.getInstance.customerNote == "") {
CheckoutSession.getInstance.customerNote = null;
}
bool isSuccessful = NyValidator.isSuccessful(rules: {
"Order Note".tr(): [CheckoutSession.getInstance.customerNote ?? "", "max:100"]
});
if (isSuccessful == false) {
showToastNotification(context, title: "Error".tr(), description: "Order note must be less than 100 characters".tr(), style: ToastNotificationStyleType.DANGER, icon: Icons.error);
return;
}
StateAction.refreshPage(CheckoutConfirmationPage.path, setState: () {});
Navigator.pop(context);
}),
],
),),),
);
},
);
}

_removeCustomerNote() {
CheckoutSession.getInstance.customerNote = null;
StateAction.refreshPage(CheckoutConfirmationPage.path, setState: () {});
}
}
Loading

0 comments on commit 8bd82fa

Please sign in to comment.