Commit Graph

13 Commits

Author SHA1 Message Date
Saad Tarhi 547cc76f8e Fix save changes bug in Firefox browser (https://github.com/woocommerce/woocommerce-blocks/pull/8754) 2023-03-22 12:45:48 +00:00
Saad Tarhi abe3488861 Local Pickup: merge country and state into same field in location modal (https://github.com/woocommerce/woocommerce-blocks/pull/8408)
* Get the default store state

We are merging the Country & State fields. So, we should get both
default values

* Merge the Country & State fields

We merged both fields in the Pickup Location form modal

We can see a similar example in `WooCommerce -> Settings -> General`

* Clean up the code

* Show the state text field above the country select

* Create some util functions

* Refactor the Form component

* Display a user friendly country and state in admin

* Fix country defaulting to "Afghan" bug
2023-03-14 14:49:31 +01:00
Nadir Seghir 612ddb34d2 Add default title to pickup method field 2023-01-12 15:42:43 +01:00
Nadir Seghir 3cbf0d7404 Local Pickup: don't allow negative values 2023-01-12 15:42:43 +01:00
Nadir Seghir fb18a7a76d Use custom error messages for Local Pickup admin screen 2023-01-12 15:42:43 +01:00
Nadir Seghir 549358c65c Local Pickup: Change location modal to have store country as default country 2023-01-12 15:42:43 +01:00
Nadir Seghir 86a3b2a0ef Local Pickup: Fix default status for local pickup enabling setting 2023-01-12 15:42:43 +01:00
Nadir Seghir 7f84e9348a Local Pickup: only allow digits in cost 2023-01-12 15:42:43 +01:00
Seghir Nadir 3eb51342a9 Add validation to local pickup fields (https://github.com/woocommerce/woocommerce-blocks/pull/8007)
* add form validation for admin screen

* add types

* add validation to fields

* restore form ref
2023-01-12 15:42:43 +01:00
Mike Jolley 1f69e4b5e6 Local Pickup: add empty state UI for location table (https://github.com/woocommerce/woocommerce-blocks/pull/7871) 2023-01-12 15:42:04 +01:00
Seghir Nadir 3c824053d7 Show notice if merchant has legacy local pickup enabled alongside the new pickup (https://github.com/woocommerce/woocommerce-blocks/pull/7842)
* add notice when there are existing enabled legacy local pickups

* Fix PHP warning

* Link though to the settings page

* Fix setting save

* Enabling this will produce duplicate options at checkout.

Co-authored-by: Mike Jolley <mike.jolley@me.com>
2023-01-12 15:42:04 +01:00
Mike Jolley f2318060e1 Local Pickup: handle some UI issues
Duplicate selector

Convert to sentence case

Swap location and name in rate
2023-01-12 15:42:04 +01:00
Mike Jolley c49426570d React Based Local Pickup Settings Screen (https://github.com/woocommerce/woocommerce-blocks/pull/7581)
* Move payment methods

* Setup entrypoints

* Sortable implementation

* Sortable

* Basic UI in place for settings

* Hydrate real settings

* Form updates values

* Styling and save button placement

* useSettings hook

* Prepare for save

* delete

* Add location button

* Remove className

* Conditional display of taxes

* Save via API

* Update general settings to designs

* Modal styles

* Style table

* Border colors and radius

* Added e2e tests

* use node 16

* Enqueue states in admin

* Use render from wordpress/element

* Missing handle style

* Enable translations

* Remove curried function

* Todo for inline settings

Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
2023-01-12 15:40:15 +01:00