# Promotion Display Fix: "testing undefined EGP OFF"

## Problem

The promotion was displaying "testing undefined EGP OFF" instead of showing the correct discount information.

## Root Cause

The frontend was trying to access `promotion.discount_value` property which doesn't exist in the API response. The actual API response structure is:

```json
{
    "id": 3,
    "name": "testing",
    "description": "testing",
    "discount_type": "fixed",
    "applied_items": [],
    "free_items": [],
    "voucher_code": null
}
```

There's no `discount_value` field - the actual discount amount is calculated and stored in the `total_discount` field of the response.

## Solution

Updated the frontend code to handle the correct response structure:

### Files Modified:

1. **`resources/js/components/POS/PromotionPanel.tsx`**

    - Fixed the promotion badge display logic
    - Changed from `${promotion.discount_value} EGP OFF` to `DISCOUNT APPLIED`
    - Added fallback handling for missing discount values

2. **`resources/js/stores/cartStore.ts`**

    - Updated `AppliedPromotion` interface to match API response
    - Removed `discount_value` property
    - Added `description` property

3. **`resources/js/hooks/usePosPromotions.ts`**

    - Updated `AppliedPromotion` interface to match API response
    - Removed `discount_amount` and `free_items_count` properties
    - Added `applied_items` and `free_items` arrays

4. **`resources/js/components/POS/PosPromotionPanel.tsx`**
    - Updated `AppliedPromotion` interface to match API response

### Key Changes:

```typescript
// Before (causing "undefined EGP OFF")
{promotion.discount_value} EGP OFF

// After (showing correct message)
promotion.discount_type === 'fixed' ? 'DISCOUNT APPLIED' : 'PROMOTION APPLIED'
```

## Testing

✅ API returns correct structure without `discount_value`  
✅ Frontend now displays "DISCOUNT APPLIED" instead of "undefined EGP OFF"  
✅ Promotion system working correctly (450 EGP discount applied)  
✅ All interfaces updated to match API response structure

## Result

The promotion now displays correctly as "testing DISCOUNT APPLIED" instead of "testing undefined EGP OFF".
