Added minimarket store type with correct row positions

This commit is contained in:
denisacirstea
2025-09-12 13:28:11 +03:00
parent 5e474abc49
commit 4e18caa8f7
3 changed files with 46 additions and 20 deletions

View File

@@ -5,11 +5,11 @@
"company_name": "Footprints AI",
"email": "denisa@example.com",
"phone": "+40 712 345 678",
"store_name": "Ursus",
"store_name": "Media",
"country": "Romania",
"starting_date": "01.01.2027",
"duration": 24,
"store_types": ["convenience", "supermarket", "hypermarket"],
"starting_date": "01.01.2025",
"duration": 36,
"store_types": ["convenience", "minimarket", "supermarket", "hypermarket"],
"open_days_per_month": 26,
"convenience_store_type": {
@@ -23,6 +23,17 @@
"open_days_per_month": 26
},
"minimarket_store_type": {
"stores_number": 50,
"monthly_transactions": 600000,
"has_digital_screens": true,
"screen_count": 150,
"screen_percentage": 60,
"has_in_store_radio": true,
"radio_percentage": 70,
"open_days_per_month": 26
},
"supermarket_store_type": {
"stores_number": 80,
"monthly_transactions": 450000,

View File

@@ -245,6 +245,9 @@
<div id="convenience-option" class="py-1 px-3 hover:bg-gray-50 rounded-md cursor-pointer flex items-center" onclick="selectStoreTypeOption('convenience', 'Convenience', 'bg-[#eb742e] text-white')">
<span class="text-sm text-gray-700">Convenience</span>
</div>
<div id="minimarket-option" class="py-1 px-3 hover:bg-gray-50 rounded-md cursor-pointer flex items-center" onclick="selectStoreTypeOption('minimarket', 'Minimarket', 'bg-[#ec8038] text-white')">
<span class="text-sm text-gray-700">Minimarket</span>
</div>
<div id="supermarket-option" class="py-1 px-3 hover:bg-gray-50 rounded-md cursor-pointer flex items-center" onclick="selectStoreTypeOption('supermarket', 'Supermarket', 'bg-[#f08343] text-white')">
<span class="text-sm text-gray-700">Supermarket</span>
</div>
@@ -859,6 +862,7 @@
// Ensure store type checkboxes exist
ensureCheckboxExists('convenience', 'storeTypes', 'Convenience');
ensureCheckboxExists('minimarket', 'storeTypes', 'Minimarket');
ensureCheckboxExists('supermarket', 'storeTypes', 'Supermarket');
ensureCheckboxExists('hypermarket', 'storeTypes', 'Hypermarket');
@@ -1237,7 +1241,7 @@
];
// Also check for store type specific sections
const storeTypes = ['convenience', 'supermarket', 'hypermarket'];
const storeTypes = ['convenience', 'minimarket', 'supermarket', 'hypermarket'];
storeTypes.forEach(type => {
// Make sure the checkbox element exists
const checkbox = document.getElementById(type);

View File

@@ -63,27 +63,38 @@ def update_excel_variables(excel_path):
'M37': 1 if user_data.get('convenience_store_type', {}).get('has_in_store_radio', False) else 0,
'N37': user_data.get('convenience_store_type', {}).get('radio_percentage', 0),
# Supermarket store type
'H38': user_data.get('supermarket_store_type', {}).get('stores_number', 0),
'C38': user_data.get('supermarket_store_type', {}).get('monthly_transactions', 0),
# Minimarket store type
'H38': user_data.get('minimarket_store_type', {}).get('stores_number', 0),
'C38': user_data.get('minimarket_store_type', {}).get('monthly_transactions', 0),
# Convert boolean to 1/0 for has_digital_screens
'I38': 1 if user_data.get('supermarket_store_type', {}).get('has_digital_screens', False) else 0,
'J38': user_data.get('supermarket_store_type', {}).get('screen_count', 0),
'K38': user_data.get('supermarket_store_type', {}).get('screen_percentage', 0),
'I38': 1 if user_data.get('minimarket_store_type', {}).get('has_digital_screens', False) else 0,
'J38': user_data.get('minimarket_store_type', {}).get('screen_count', 0),
'K38': user_data.get('minimarket_store_type', {}).get('screen_percentage', 0),
# Convert boolean to 1/0 for has_in_store_radio
'M38': 1 if user_data.get('supermarket_store_type', {}).get('has_in_store_radio', False) else 0,
'N38': user_data.get('supermarket_store_type', {}).get('radio_percentage', 0),
'M38': 1 if user_data.get('minimarket_store_type', {}).get('has_in_store_radio', False) else 0,
'N38': user_data.get('minimarket_store_type', {}).get('radio_percentage', 0),
# Supermarket store type
'H39': user_data.get('supermarket_store_type', {}).get('stores_number', 0),
'C39': user_data.get('supermarket_store_type', {}).get('monthly_transactions', 0),
# Convert boolean to 1/0 for has_digital_screens
'I39': 1 if user_data.get('supermarket_store_type', {}).get('has_digital_screens', False) else 0,
'J39': user_data.get('supermarket_store_type', {}).get('screen_count', 0),
'K39': user_data.get('supermarket_store_type', {}).get('screen_percentage', 0),
# Convert boolean to 1/0 for has_in_store_radio
'M39': 1 if user_data.get('supermarket_store_type', {}).get('has_in_store_radio', False) else 0,
'N39': user_data.get('supermarket_store_type', {}).get('radio_percentage', 0),
# Hypermarket store type
'H39': user_data.get('hypermarket_store_type', {}).get('stores_number', 0),
'C39': user_data.get('hypermarket_store_type', {}).get('monthly_transactions', 0),
'H40': user_data.get('hypermarket_store_type', {}).get('stores_number', 0),
'C40': user_data.get('hypermarket_store_type', {}).get('monthly_transactions', 0),
# Convert boolean to 1/0 for has_digital_screens
'I39': 1 if user_data.get('hypermarket_store_type', {}).get('has_digital_screens', False) else 0,
'J39': user_data.get('hypermarket_store_type', {}).get('screen_count', 0),
'K39': user_data.get('hypermarket_store_type', {}).get('screen_percentage', 0),
'I40': 1 if user_data.get('hypermarket_store_type', {}).get('has_digital_screens', False) else 0,
'J40': user_data.get('hypermarket_store_type', {}).get('screen_count', 0),
'K40': user_data.get('hypermarket_store_type', {}).get('screen_percentage', 0),
# Convert boolean to 1/0 for has_in_store_radio
'M39': 1 if user_data.get('hypermarket_store_type', {}).get('has_in_store_radio', False) else 0,
'N39': user_data.get('hypermarket_store_type', {}).get('radio_percentage', 0),
'M40': 1 if user_data.get('hypermarket_store_type', {}).get('has_in_store_radio', False) else 0,
'N40': user_data.get('hypermarket_store_type', {}).get('radio_percentage', 0),
# On-site channels
'B43': user_data.get('website_visitors', 0),