Skip to content

Commit

Permalink
fix: Flag on customer profile
Browse files Browse the repository at this point in the history
  • Loading branch information
mckenziearts committed Jul 29, 2024
1 parent 3c467a7 commit 40dfc09
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 25 deletions.
2 changes: 1 addition & 1 deletion packages/admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"resolve-url-loader": "^2.3.1",
"shiki": "^1.3.0",
"sortablejs": "^1.15.0",
"tailwindcss": "^3.4.1"
"tailwindcss": "^3.4.7"
},
"dependencies": {
"treeselectjs": "^0.10.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/admin/public/shopper.css

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,21 @@
</span>
</div>
<h4 class="mt-1 block text-sm font-medium text-gray-900 dark:text-white">
{{ $address->last_name . ' ' . $address->first_name }}
{{ $address->full_name }}
</h4>
<div class="mt-1 text-sm leading-5">
<p class="text-gray-500 dark:text-gray-400">
{{ $address->street_address }}, {{ $address->city }}
{{ $address->street_address }}
</p>
<div class="truncate text-sm text-gray-500 dark:text-gray-400">
<span>{{ $address->phone_number }}</span>
<br />
<span>{{ $address->zipcode }}</span>
,
<span>{{ $address->country->name }}</span>
<span class="inline-flex h-6 w-6 rounded-full">{{ $address->country->svg_flag }}</span>
<div class="flex flex-col space-y-0.5 truncate text-sm text-gray-500 dark:text-gray-400">
<span>{{ $address->postal_code }}, {{ $address->city }}</span>
<span class="inline-flex items-center gap-2 shrink-0">
<span>{{ $address->country->name }}</span>
<img src="{{ $address->country->svg_flag }}" class="size-5 rounded-full object-center object-cover" alt="Country flag">
</span>
@if($address->phone_number)
<span>{{ $address->phone_number }}</span>
@endif
</div>
</div>
</div>
Expand Down
8 changes: 8 additions & 0 deletions packages/admin/src/Enum/FeatureState.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,16 @@

namespace Shopper\Enum;

use Shopper\Core\Traits\HasEnumStaticMethods;

/**
* @method static string Enabled()
* @method static string Disabled()
*/
enum FeatureState: string
{
use HasEnumStaticMethods;

case Enabled = 'enabled';

case Disabled = 'disabled';
Expand Down
3 changes: 2 additions & 1 deletion packages/admin/src/Livewire/SlideOvers/ZoneForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function mount(?int $zoneId = null): void
: __('shopper::pages/settings/zones.add_action');

$this->countriesInZone = Country::query()
->whereHas('zone')
->whereHas('zones')
->pluck('id')
->toArray();

Expand Down Expand Up @@ -92,6 +92,7 @@ public function form(Form $form): Form
->label(__('shopper::forms.label.countries'))
->placeholder(__('shopper::forms.placeholder.select_countries'))
->multiple()
->required()
->options(
Country::query()
->select('name', 'id')
Expand Down
40 changes: 27 additions & 13 deletions packages/admin/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1188,10 +1188,10 @@ jackspeak@^2.3.5:
optionalDependencies:
"@pkgjs/parseargs" "^0.11.0"

jiti@^1.19.1:
version "1.21.0"
resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.21.0.tgz#7c97f8fe045724e136a397f7340475244156105d"
integrity sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==
jiti@^1.21.0:
version "1.21.6"
resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.21.6.tgz#6c7f7398dd4b3142767f9a168af2f317a428d268"
integrity sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==

json-parse-better-errors@^1.0.1:
version "1.0.2"
Expand Down Expand Up @@ -1935,8 +1935,16 @@ spdx-license-ids@^3.0.0:
resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.17.tgz#887da8aa73218e51a1d917502d79863161a93f9c"
integrity sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==

"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0:
name string-width-cjs
"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

string-width@^4.1.0:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand Down Expand Up @@ -1992,8 +2000,14 @@ string.prototype.trimstart@^1.0.7:
define-properties "^1.2.1"
es-object-atoms "^1.0.0"

"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
name strip-ansi-cjs
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"

strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand Down Expand Up @@ -2042,10 +2056,10 @@ tabbable@^5.3.3:
resolved "https://registry.yarnpkg.com/tabbable/-/tabbable-5.3.3.tgz#aac0ff88c73b22d6c3c5a50b1586310006b47fbf"
integrity sha512-QD9qKY3StfbZqWOPLp0++pOrAVb/HbUi5xCc8cUo4XjP19808oaMiDzn0leBY5mCespIBM0CIZePzZjgzR83kA==

tailwindcss@^3.4.1:
version "3.4.1"
resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.4.1.tgz#f512ca5d1dd4c9503c7d3d28a968f1ad8f5c839d"
integrity sha512-qAYmXRfk3ENzuPBakNK0SRrUDipP8NQnEY6772uDhflcQz5EhRdD7JNZxyrFHVQNCwULPBn6FNPp9brpO7ctcA==
tailwindcss@^3.4.7:
version "3.4.7"
resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.4.7.tgz#6092f18767f5933f59375b9afe558e592fc77201"
integrity sha512-rxWZbe87YJb4OcSopb7up2Ba4U82BoiSGUdoDr3Ydrg9ckxFS/YWsvhN323GMcddgU65QRy7JndC7ahhInhvlQ==
dependencies:
"@alloc/quick-lru" "^5.2.0"
arg "^5.0.2"
Expand All @@ -2055,7 +2069,7 @@ tailwindcss@^3.4.1:
fast-glob "^3.3.0"
glob-parent "^6.0.2"
is-glob "^4.0.3"
jiti "^1.19.1"
jiti "^1.21.0"
lilconfig "^2.1.0"
micromatch "^4.0.5"
normalize-path "^3.0.0"
Expand Down

0 comments on commit 40dfc09

Please sign in to comment.