Skip to content

Commit

Permalink
Merge pull request #663 from appwrite/fix-empty-zip
Browse files Browse the repository at this point in the history
Fix: empty zip, non-prefilled state
  • Loading branch information
eldadfux authored Dec 19, 2023
2 parents 675b363 + d935b06 commit ba8458a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/routes/console/account/payments/addressModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
address,
city,
state,
zip,
zip ? zip : undefined,
address2 ? address2 : undefined
);
trackEvent(Submit.BillingAddressCreate);
Expand Down
6 changes: 5 additions & 1 deletion src/routes/console/account/payments/editAddressModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
onMount(async () => {
const countryList = await sdk.forProject.locale.listCountries();
const locale = await sdk.forProject.locale.get();
if (locale.countryCode) {
selectedAddress.country = locale.countryCode;
}
options = countryList.countries.map((country) => {
return {
value: country.code,
Expand All @@ -38,7 +42,7 @@
selectedAddress.streetAddress,
selectedAddress.city,
selectedAddress.state,
selectedAddress.postalCode,
selectedAddress.postalCode ? selectedAddress.postalCode : undefined,
selectedAddress.addressLine2 ? selectedAddress.addressLine2 : undefined
);
await invalidate(Dependencies.ADDRESS);
Expand Down
4 changes: 3 additions & 1 deletion src/routes/console/changeOrganizationTierCloud.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@
$changeOrganizationTier.billingAddress.streetAddress,
$changeOrganizationTier.billingAddress.city,
$changeOrganizationTier.billingAddress.state,
$changeOrganizationTier.billingAddress.postalCode,
$changeOrganizationTier.billingAddress.postalCode
? $changeOrganizationTier.billingAddress.postalCode
: undefined,
$changeOrganizationTier.billingAddress.addressLine2
? $changeOrganizationTier.billingAddress.addressLine2
: undefined
Expand Down
4 changes: 3 additions & 1 deletion src/routes/console/createOrganizationCloud.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@
$createOrganization.billingAddress.streetAddress,
$createOrganization.billingAddress.city,
$createOrganization.billingAddress.state,
$createOrganization.billingAddress.postalCode,
$createOrganization.billingAddress.postalCode
? $createOrganization.billingAddress.postalCode
: undefined,
$createOrganization.billingAddress.addressLine2
? $createOrganization.billingAddress.addressLine2
: undefined
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
label: 'United States'
}
];
onMount(async () => {
addresses = await sdk.forConsole.billing.listAddresses();
Expand Down Expand Up @@ -61,8 +62,8 @@
streetAddress,
city,
state,
postalCode,
addressLine2
postalCode ? postalCode : undefined,
addressLine2 ? postalCode : undefined
);
await sdk.forConsole.billing.setBillingAddress($organization.$id, address.$id);
Expand Down

0 comments on commit ba8458a

Please sign in to comment.