feat(loyalty): make logo URL mandatory on program edit forms
Some checks failed
Some checks failed
Logo URL is required by Google Wallet API for LoyaltyClass creation. Added validation across all three program edit screens (admin, merchant, store) with a helpful hint explaining the requirement. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -100,6 +100,7 @@ function adminLoyaltyProgramEdit() {
|
||||
|
||||
try {
|
||||
const payload = this.buildPayload();
|
||||
if (!payload) { this.saving = false; return; }
|
||||
|
||||
if (this.isNewProgram) {
|
||||
const response = await apiClient.post(
|
||||
|
||||
@@ -52,6 +52,7 @@ function merchantLoyaltySettings() {
|
||||
|
||||
try {
|
||||
const payload = this.buildPayload();
|
||||
if (!payload) { this.saving = false; return; }
|
||||
|
||||
if (this.isNewProgram) {
|
||||
await apiClient.post('/merchants/loyalty/program', payload);
|
||||
|
||||
@@ -98,7 +98,10 @@ function createProgramFormMixin() {
|
||||
if (!payload.minimum_purchase_cents) payload.minimum_purchase_cents = null;
|
||||
if (!payload.card_name) payload.card_name = null;
|
||||
if (!payload.card_secondary_color) payload.card_secondary_color = null;
|
||||
if (!payload.logo_url) payload.logo_url = null;
|
||||
if (!payload.logo_url) {
|
||||
this.error = 'Logo URL is required for wallet integration.';
|
||||
return null;
|
||||
}
|
||||
if (!payload.hero_image_url) payload.hero_image_url = null;
|
||||
if (!payload.terms_text) payload.terms_text = null;
|
||||
if (!payload.privacy_url) payload.privacy_url = null;
|
||||
|
||||
@@ -82,6 +82,7 @@ function loyaltySettings() {
|
||||
|
||||
try {
|
||||
const payload = this.buildPayload();
|
||||
if (!payload) { this.saving = false; return; }
|
||||
|
||||
let response;
|
||||
if (this.isNewProgram) {
|
||||
|
||||
Reference in New Issue
Block a user