db.products.filter(p => db.currentCategory ? p.categoryId === db.currentCategory : true);
filtered.forEach(product => {
const cat = db.categories.find(c => c.id === product.categoryId);
const div = document.createElement('button');
div.className = `relative bg-card-dark border border-border-dark rounded-xl p-3 text-right transition card-hover ${product.qty <= product.alert ? 'border-red-500' : ''}`;
div.onclick = () => addToCart(product.id);
div.innerHTML = `
${product.image ? `
` : ''}
${product.name}
${product.price} ${db.currency}
الكمية: ${product.qty}
${db.currentUser.role === 'admin' ? `
✏️
🗑️
` : ''}
${cat.name}
`;
container.appendChild(div);
});
}
function openStockModal() {
document.getElementById('stockModal').classList.remove('hidden');
renderStockTable();
resetProductForm();
}
function closeStockModal() {
document.getElementById('stockModal').classList.add('hidden');
}
function resetProductForm() {
document.getElementById('productFormTitle').textContent = 'إضافة منتج';
document.getElementById('editProductId').value = '';
document.getElementById('newProductName').value = '';
document.getElementById('newProductPrice').value = '';
document.getElementById('newProductQty').value = '';
document.getElementById('newProductBarcode').value = '';
document.getElementById('newProductCategory').value = '';
document.getElementById('newProductAlert').value = '';
document.getElementById('newProductImage').value = '';
}
function saveProduct() {
const id = document.getElementById('editProductId').value;
const name = document.getElementById('newProductName').value.trim();
const price = parseFloat(document.getElementById('newProductPrice').value);
const qty = parseInt(document.getElementById('newProductQty').value) || 0;
const barcode = document.getElementById('newProductBarcode').value.trim();
const categoryId = parseInt(document.getElementById('newProductCategory').value);
const alertQty = parseInt(document.getElementById('newProductAlert').value) || 0;
const imageFile = document.getElementById('newProductImage').files[0];
if (!name || isNaN(price) || isNaN(qty) || !categoryId) return alert('يرجى ملء جميع الحقول المطلوبة');
let imageUrl = '';
if (imageFile) {
const reader = new FileReader();
reader.onload = function(e) {
imageUrl = e.target.result;
saveProductToDB(id, name, price, qty, barcode, categoryId, alertQty, imageUrl);
};
reader.readAsDataURL(imageFile);
} else {
saveProductToDB(id, name, price, qty, barcode, categoryId, alertQty, imageUrl);
}
}
function saveProductToDB(id, name, price, qty, barcode, categoryId, alertQty, imageUrl) {
if (id) {
const product = db.products.find(p => p.id == id);
const oldName = product.name;
product.name = name;
product.price = price;
product.qty = qty;
product.barcode = barcode;
product.categoryId = categoryId;
product.alert = alertQty;
if (imageUrl) product.image = imageUrl;
logAudit('تعديل منتج', `تم تعديل المنتج: ${oldName} → ${name}`);
} else {
const newId = db.products.length > 0 ? Math.max(...db.products.map(p => p.id)) + 1 : 1;
db.products.push({
id: newId,
name,
price,
qty,
barcode,
categoryId,
alert: alertQty,
image: imageUrl
});
logAudit('إضافة منتج', `تم إضافة المنتج: ${name}`);
}
saveData();
renderProducts();
renderStockTable();
resetProductForm();
checkLowStock();
}
function editProduct(id) {
const product = db.products.find(p => p.id === id);
document.getElementById('productFormTitle').textContent = 'تعديل منتج';
document.getElementById('editProductId').value = product.id;
document.getElementById('newProductName').value = product.name;
document.getElementById('newProductPrice').value = product.price;
document.getElementById('newProductQty').value = product.qty;
document.getElementById('newProductBarcode').value = product.barcode;
document.getElementById('newProductCategory').value = product.categoryId;
document.getElementById('newProductAlert').value = product.alert;
openStockModal();
}
function deleteProduct(id) {
if (!confirm('هل تريد حذف المنتج؟')) return;
const productName = db.products.find(p => p.id === id).name;
db.products = db.products.filter(p => p.id !== id);
logAudit('حذف منتج', `تم حذف المنتج: ${productName}`);
saveData();
renderProducts();
renderStockTable();
}
function renderStockTable() {
const tbody = document.getElementById('stockTableBody');
tbody.innerHTML = '';
db.products.forEach(product => {
const cat = db.categories.find(c => c.id === product.categoryId);
const tr = document.createElement('tr');
tr.className = 'border-b border-border-dark';
tr.innerHTML = `
${product.name}
${product.price} ${db.currency}
${product.qty}
${product.barcode}
${cat.name}
${product.alert}
✏️
🗑️
`;
tbody.appendChild(tr);
});
}
// ==================== السلة ====================
function addToCart(productId) {
const product = db.products.find(p => p.id === productId);
if (product.qty <= 0) return alert('المنتج غير متوفر!');
const existingItem = db.cart.find(item => item.id === productId);
if (existingItem) {
existingItem.qty += 1;
} else {
db.cart.push({ ...product, qty: 1 });
}
renderCart();
}
function removeFromCart(productId) {
const itemIndex = db.cart.findIndex(item => item.id === productId);
if (itemIndex === -1) return;
if (db.cart[itemIndex].qty > 1) {
db.cart[itemIndex].qty -= 1;
} else {
db.cart.splice(itemIndex, 1);
}
renderCart();
}
function clearCart() {
if (db.cart.length === 0) return;
if (confirm('هل تريد إفراغ السلة؟')) {
db.cart = [];
renderCart();
}
}
function renderCart() {
const container = document.getElementById('cartItems');
container.innerHTML = '';
if (db.cart.length === 0) {
container.innerHTML = '
السلة فارغة
';
return;
}
db.cart.forEach(item => {
const div = document.createElement('div');
div.className = 'flex items-center gap-2 bg-ultra-dark p-2 rounded-lg';
div.innerHTML = `
−
${item.name}
${item.price} ${db.currency} × ${item.qty}
${(item.price * item.qty).toFixed(2)} ${db.currency}
+
`;
container.appendChild(div);
});
updateCartTotals();
}
function updateCartTotals() {
const subtotal = db.cart.reduce((sum, item) => sum + (item.price * item.qty), 0);
const discountValue = parseFloat(document.getElementById('discountValue').value) || 0;
const discountType = document.getElementById('discountType').value;
let discountAmount = 0;
if (discountType === 'percent') {
discountAmount = subtotal * (discountValue / 100);
} else {
discountAmount = discountValue;
}
const total = subtotal - discountAmount;
document.getElementById('subtotal').textContent = subtotal.toFixed(2);
document.getElementById('discountAmount').textContent = `-${discountAmount.toFixed(2)}`;
document.getElementById('cartTotal').textContent = total.toFixed(2);
}
document.getElementById('discountValue').addEventListener('input', updateCartTotals);
document.getElementById('discountType').addEventListener('change', updateCartTotals);
// ==================== إتمام البيع ====================
function checkout() {
if (db.cart.length === 0) return alert('السلة فارغة!');
const paymentMethod = document.getElementById('paymentMethod').value;
const subtotal = parseFloat(document.getElementById('subtotal').textContent);
const discountAmount = parseFloat(document.getElementById('discountAmount').textContent.replace('-', ''));
const total = parseFloat(document.getElementById('cartTotal').textContent);
// تحديث المخزون
db.cart.forEach(cartItem => {
const product = db.products.find(p => p.id === cartItem.id);
product.qty -= cartItem.qty;
});
// إنشاء فاتورة
const invoiceId = db.sales.length > 0 ? Math.max(...db.sales.map(s => s.id)) + 1 : 1;
const invoice = {
id: invoiceId,
date: new Date().toISOString(),
items: [...db.cart],
subtotal,
discount: discountAmount,
total,
paymentMethod,
status: 'completed',
user: db.currentUser.username
};
db.sales.push(invoice);
db.lastInvoice = invoice;
// تسجيل العملية
logAudit('إتمام بيع', `فاتورة رقم ${invoiceId} بقيمة ${total} ${db.currency}`);
// حفظ البيانات
saveData();
// طباعة الفاتورة
printInvoice(invoice);
// إفراغ السلة
db.cart = [];
renderCart();
renderProducts();
checkLowStock();
}
// ==================== طباعة الفاتورة ====================
function printInvoice(invoice) {
document.getElementById('invoiceDate').textContent = new Date(invoice.date).toLocaleString('ar-EG');
document.getElementById('invoiceNumber').textContent = invoice.id;
document.getElementById('invoicePayment').textContent = invoice.paymentMethod;
document.getElementById('invoiceSubtotal').textContent = invoice.subtotal.toFixed(2);
document.getElementById('invoiceDiscount').textContent = `-${invoice.discount.toFixed(2)}`;
document.getElementById('invoiceTotal').textContent = invoice.total.toFixed(2);
const itemsContainer = document.getElementById('invoiceItems');
itemsContainer.innerHTML = '';
invoice.items.forEach(item => {
const div = document.createElement('div');
div.style.display = 'flex';
div.style.justifyContent = 'space-between';
div.style.marginBottom = '4px';
div.innerHTML = `
${item.name} × ${item.qty}
${(item.price * item.qty).toFixed(2)}
`;
itemsContainer.appendChild(div);
});
// توليد الباركود
JsBarcode("#invoiceBarcode", invoice.id.toString(), {
format: "CODE128",
displayValue: true,
fontSize: 12,
height: 40,
margin: 0
});
// طباعة الفاتورة
window.print();
}
// ==================== إدارة الفواتير ====================
function openInvoicesModal() {
document.getElementById('invoicesModal').classList.remove('hidden');
renderInvoicesTable();
}
function closeInvoicesModal() {
document.getElementById('invoicesModal').classList.add('hidden');
}
function renderInvoicesTable() {
const tbody = document.getElementById('invoicesTableBody');
tbody.innerHTML = '';
const dateFilter = document.getElementById('invoiceDateFilter').value;
const searchFilter = document.getElementById('invoiceSearchFilter').value.toLowerCase();
const filtered = db.sales.filter(sale => {
const saleDate = new Date(sale.date).toISOString().split('T')[0];
return (!dateFilter || saleDate === dateFilter) &&
(!searchFilter || sale.id.toString().includes(searchFilter));
});
filtered.forEach(sale => {
const tr = document.createElement('tr');
tr.className = 'border-b border-border-dark';
tr.innerHTML = `
${sale.id}
${new Date(sale.date).toLocaleString('ar-EG')}
${sale.total.toFixed(2)} ${db.currency}
${sale.paymentMethod}
${sale.status}
عرض
طباعة
${sale.status === 'completed' ? `إلغاء ` : ''}
`;
tbody.appendChild(tr);
});
}
function viewInvoice(id) {
const invoice = db.sales.find(s => s.id === id);
if (!invoice) return;
let itemsHTML = '';
invoice.items.forEach(item => {
itemsHTML += `${item.name} × ${item.qty} = ${(item.price * item.qty).toFixed(2)} ${db.currency}\n`;
});
alert(`
فاتورة رقم: ${invoice.id}
التاريخ: ${new Date(invoice.date).toLocaleString('ar-EG')}
المستخدم: ${invoice.user}
طريقة الدفع: ${invoice.paymentMethod}
الحالة: ${invoice.status}
الأصناف:
${itemsHTML}
الإجمالي الفرعي: ${invoice.subtotal.toFixed(2)} ${db.currency}
الخصم: -${invoice.discount.toFixed(2)} ${db.currency}
الإجمالي: ${invoice.total.toFixed(2)} ${db.currency}
`);
}
function printInvoiceFromModal(id) {
const invoice = db.sales.find(s => s.id === id);
if (invoice) printInvoice(invoice);
}
function cancelInvoice(id) {
if (!confirm('هل تريد إلغاء الفاتورة؟')) return;
const invoice = db.sales.find(s => s.id === id);
if (!invoice) return;
// إعادة المخزون
invoice.items.forEach(item => {
const product = db.products.find(p => p.id === item.id);
if (product) product.qty += item.qty;
});
// تحديث الحالة
invoice.status = 'canceled';
logAudit('إلغاء فاتورة', `تم إلغاء الفاتورة رقم ${id}`);
saveData();
renderInvoicesTable();
renderProducts();
}
// ==================== التقارير ====================
function openReportsModal() {
document.getElementById('reportsModal').classList.remove('hidden');
renderReports();
initCharts();
}
function closeReportsModal() {
document.getElementById('reportsModal').classList.add('hidden');
}
function renderReports() {
const today = new Date().toISOString().split('T')[0];
const todaySales = db.sales.filter(s => new Date(s.date).toISOString().split('T')[0] === today && s.status === 'completed');
const dailyTotal = todaySales.reduce((sum, sale) => sum + sale.total, 0);
const dailyCount = todaySales.length;
const dailyCanceled = db.sales.filter(s => new Date(s.date).toISOString().split('T')[0] === today && s.status === 'canceled').length;
document.getElementById('reportDailyTotal').textContent = dailyTotal.toFixed(2);
document.getElementById('reportDailyCount').textContent = dailyCount;
document.getElementById('reportDailyCanceled').textContent = dailyCanceled;
}
function initCharts() {
// بيانات المبيعات الشهرية
const monthlyData = Array(12).fill(0);
db.sales.forEach(sale => {
if (sale.status === 'completed') {
const month = new Date(sale.date).getMonth();
monthlyData[month] += sale.total;
}
});
const monthlyCtx = document.getElementById('monthlyChart').getContext('2d');
if (window.monthlyChart) window.monthlyChart.destroy();
window.monthlyChart = new Chart(monthlyCtx, {
type: 'bar',
data: {
labels: ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'],
datasets: [{
label: 'المبيعات الشهرية',
data: monthlyData,
backgroundColor: '#6366f1',
borderRadius: 4,
borderSkipped: false
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: { legend: { display: false } },
scales: {
y: { beginAtZero: true, ticks: { color: '#9ca3af' } },
x: { ticks: { color: '#9ca3af' } }
}
}
});
// بيانات الأكثر مبيعاً
const productSales = {};
db.sales.forEach(sale => {
if (sale.status === 'completed') {
sale.items.forEach(item => {
productSales[item.name] = (productSales[item.name] || 0) + item.qty;
});
}
});
const topProducts = Object.entries(productSales)
.sort((a, b) => b[1] - a[1])
.slice(0, 5);
const topCtx = document.getElementById('topProductsChart').getContext('2d');
if (window.topProductsChart) window.topProductsChart.destroy();
window.topProductsChart = new Chart(topCtx, {
type: 'doughnut',
data: {
labels: topProducts.map(p => p[0]),
datasets: [{
data: topProducts.map(p => p[1]),
backgroundColor: ['#3b82f6', '#f59e0b', '#ec4899', '#10b981', '#8b5cf6'],
borderWidth: 0
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: { position: 'right', labels: { color: '#9ca3af' } }
}
}
});
}
function exportExcel() {
const wb = XLSX.utils.book_new();
const wsData = [
['التاريخ', 'رقم الفاتورة', 'الإجمالي', 'الدفع', 'الحالة', 'المستخدم'],
...db.sales.map(sale => [
new Date(sale.date).toLocaleString('ar-EG'),
sale.id,
sale.total,
sale.paymentMethod,
sale.status,
sale.user
])
];
const ws = XLSX.utils.aoa_to_sheet(wsData);
XLSX.utils.book_append_sheet(wb, ws, 'الفواتير');
XLSX.writeFile(wb, 'تقرير_فواتير.xlsx');
}
function exportPDF() {
const { jsPDF } = window.jspdf;
const doc = new jsPDF();
doc.setFont('Cairo', 'bold');
doc.setFontSize(16);
doc.text('تقرير الفواتير', 105, 15, { align: 'center' });
doc.setFont('Cairo', 'normal');
doc.setFontSize(10);
const headers = [['التاريخ', 'رقم الفاتورة', 'الإجمالي', 'الدفع', 'الحالة', 'المستخدم']];
const data = db.sales.map(sale => [
new Date(sale.date).toLocaleString('ar-EG'),
sale.id,
sale.total.toFixed(2),
sale.paymentMethod,
sale.status,
sale.user
]);
doc.autoTable({
head: headers,
body: data,
startY: 25,
styles: { font: 'Cairo', fontSize: 8, cellPadding: 3 },
headStyles: { fillColor: [107, 40, 217], textColor: 255 }
});
doc.save('تقرير_فواتير.pdf');
}
// ==================== الباركود ====================
function setupBarcodeListener() {
document.getElementById('barcodeInput').addEventListener('input', (e) => {
const barcode = e.target.value.trim();
if (barcode) {
const product = db.products.find(p => p.barcode === barcode);
if (product) {
addToCart(product.id);
} else {
alert('المنتج غير موجود!');
}
e.target.value = '';
}
});
document.getElementById('barcodeInput').focus();
}
// ==================== تنبيه انخفاض المخزون ====================
function checkLowStock() {
const lowStock = db.products.filter(p => p.qty <= p.alert);
if (lowStock.length > 0) {
document.getElementById('stockAlert').classList.remove('hidden');
} else {
document.getElementById('stockAlert').classList.add('hidden');
}
}
// ==================== سجل التدقيق ====================
function logAudit(action, details) {
db.auditLog.push({
date: new Date().toISOString(),
user: db.currentUser.username,
action,
details
});
}
// ==================== النسخ الاحتياطي ====================
function backupData() {
const dataStr = JSON.stringify(db);
const dataUri = 'data:application/json;charset=utf-8,'+ encodeURIComponent(dataStr);
const exportFileDefaultName = `pos-erp-backup-${new Date().toISOString().split('T')[0]}.json`;
const linkElement = document.createElement('a');
linkElement.setAttribute('href', dataUri);
linkElement.setAttribute('download', exportFileDefaultName);
linkElement.click();
}
// ==================== إرسال واتساب ====================
function sendWhatsApp() {
if (!db.lastInvoice) return;
const phone = prompt('أدخل رقم الهاتف مع الكود الدولي (مثال: 201234567890)');
if (!phone) return;
let message = `*فاتورة رقم ${db.lastInvoice.id}*\n`;
message += `التاريخ: ${new Date(db.lastInvoice.date).toLocaleString('ar-EG')}\n`;
message += `الإجمالي: ${db.lastInvoice.total.toFixed(2)} ${db.currency}\n\n`;
db.lastInvoice.items.forEach(item => {
message += `• ${item.name} × ${item.qty} = ${(item.price * item.qty).toFixed(2)} ${db.currency}\n`;
});
message += `\nشكراً لزيارتكم!`;
const url = `https://wa.me/${phone}?text=${encodeURIComponent(message)}`;
window.open(url, '_blank');
}
// ==================== الأقسام حسب التصميم ====================
function renderSections() {
// Hero Section
const heroSection = document.createElement('section');
heroSection.className = 'relative w-full h-screen flex items-center justify-center overflow-hidden';
heroSection.innerHTML = `
نظام إدارة المبيعات المتكامل لأعمالك التجارية
حل متكامل لإدارة نقاط البيع والمخزون والموارد مع واجهة عربية بالكامل
تجربة النظام الآن
اكتشف المزيد
`;
document.body.insertBefore(heroSection, document.body.firstChild);
// Features Grid Section
const featuresSection = document.createElement('section');
featuresSection.className = 'py-20 px-4 max-w-6xl mx-auto';
featuresSection.innerHTML = `
مميزات النظام
حلول متكاملة لإدارة جميع جوانب عملك التجارية بكفاءة وسهولة
مسح الباركود السريع
مسح المنتجات بسهولة باستخدام ماسح الباركود أو الكاميرا، مع دعم لجميع أنواع الباركود
فواتير إلكترونية متكاملة
إنشاء وطباعة الفواتير الإلكترونية مع دعم جميع طرق الدفع والخصومات
إدارة المخزون الذكية
تتبع المخزون في الوقت الفعلي مع تنبيهات تلقائية عند انخفاض الكميات
إدارة العملاء
قاعدة بيانات متكاملة للعملاء مع تتبع المشتريات والخصومات المخصصة
تقارير وتحليلات متقدمة
تقارير مبيعات يومية وشهرية مع تحليلات ذكية لاتخاذ قرارات أفضل
دعم متعدد الأجهزة
يعمل على جميع الأجهزة من الهواتف الذكية إلى أجهزة الكمبيوتر اللوحية
`;
document.body.appendChild(featuresSection);
// POS Demo Section
const posDemoSection = document.createElement('section');
posDemoSection.className = 'py-20 px-4 bg-ultra-dark';
posDemoSection.innerHTML = `
نظام نقطة البيع الذكي
واجهة بسيطة وسريعة لإتمام عمليات البيع في ثوانٍ معدودة
بيبسي
عصير
برجر
شاورما
بطاطس
حلويات
بيبسي × 2
20.00 ج.م
برجر لحم × 1
45.00 ج.م
`;
document.body.appendChild(posDemoSection);
// ERP Dashboard Preview Section
const erpSection = document.createElement('section');
erpSection.className = 'py-20 px-4 max-w-6xl mx-auto';
erpSection.innerHTML = `
نظام إدارة الموارد ERP
لوحة تحكم متكاملة لإدارة جميع جوانب عملك من المخزون إلى الموارد البشرية
إدارة المخزون في الوقت الفعلي
تقارير مبيعات مفصلة
إدارة العملاء والموردين
تحليلات ذكية لاتخاذ القرارات
دعم متعدد المستخدمين والأدوار
المخزون الأخير
عرض الكل
بيبسي
50 (حد الإنذار: 10)
برجر لحم
20 (حد الإنذار: 5)
عصير برتقال
4 (حد الإنذار: 5)
`;
document.body.appendChild(erpSection);
// Initialize Dashboard Chart
const dashboardCtx = document.getElementById('dashboardChart').getContext('2d');
new Chart(dashboardCtx, {
type: 'line',
data: {
labels: ['1', '2', '3', '4', '5', '6', '7'],
datasets: [{
label: 'المبيعات الأسبوعية',
data: [30, 45, 25, 60, 50, 75, 40],
borderColor: '#8b5cf6',
backgroundColor: 'rgba(139, 92, 246, 0.1)',
tension: 0.4,
fill: true
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: { legend: { display: false } },
scales: {
y: { beginAtZero: true, ticks: { color: '#9ca3af' } },
x: { ticks: { color: '#9ca3af' } }
}
}
});
// Testimonials Section
const testimonialsSection = document.createElement('section');
testimonialsSection.className = 'py-20 px-4 max-w-6xl mx-auto';
testimonialsSection.innerHTML = `
آراء عملائنا
قصص نجاح حقيقية من عملاء يستخدمون نظامنا لإدارة أعمالهم
"نظام رائع وسهل الاستخدام، ساعدني في تنظيم عملي بشكل كبير. أصبح بإمكاني متابعة المبيعات والمخزون من أي مكان وفي أي وقت."
زيادة المبيعات بنسبة 30% بعد استخدام النظام
فاطمة علي
سوبرماركت النور
"الواجهة العربية البسيطة جعلت من السهل على جميع موظفيي استخدام النظام دون الحاجة لتدريب مكثف. النظام وفر لنا الكثير من الوقت والجهد."
تقليل الأخطاء في المخزون بنسبة 90%
"التقارير اليومية ساعدتني في فهم عملائي بشكل أفضل واتخاذ قرارات تسويقية أكثر فعالية. النظام أصبح جزء أساسي من عملي اليومي."
زيادة عدد العملاء الدائمين بنسبة 40%
`;
document.body.appendChild(testimonialsSection);
// Pricing Section
const pricingSection = document.createElement('section');
pricingSection.className = 'py-20 px-4 max-w-6xl mx-auto';
pricingSection.innerHTML = `
اختر الخطة المناسبة لك
خطط مرنة تناسب جميع أحجام الأعمال التجارية
الخطة الشهرية
مثالية للمحلات الصغيرة والمتوسطة
${db.currency}99
/شهر
نظام نقطة بيع كامل
إدارة المخزون الأساسية
تقارير مبيعات يومية
دعم فني عبر البريد الإلكتروني
تحديثات مجانية
ابدأ الآن
وفر 20%
الخطة السنوية
الأفضل للمحلات الكبيرة والشركات
${db.currency}999
/سنة
${db.currency}1188
جميع ميزات الخطة الشهرية
إدارة المخزون المتقدمة
تقارير وتحليلات متقدمة
دعم فني عبر الهاتف والدردشة
دعم متعدد المستخدمين والأدوار
نسخ احتياطي تلقائي
ابدأ الآن
`;
document.body.appendChild(pricingSection);
// RTL CTA Section
const ctaSection = document.createElement('section');
ctaSection.className = 'py-20 px-4 relative overflow-hidden';
ctaSection.innerHTML = `
جاهز لتحويل عملك؟
انضم الآن إلى آلاف العملاء الذين يستخدمون نظامنا لإدارة أعمالهم بكفاءة وسهولة
ابدأ تجربتك المجانية
تواصل معنا
`;
document.body.appendChild(ctaSection);
// Footer
const footer = document.createElement('footer');
footer.className = 'bg-card-dark border-t border-border-dark py-12 px-4';
footer.innerHTML = `
POS & ERP
نظام إدارة المبيعات المتكامل
حل متكامل لإدارة نقاط البيع والمخزون والموارد مع واجهة عربية بالكامل وسهلة الاستخدام
تواصل معنا
support@poserp.com
+20 123 456 7890
القاهرة، مصر
© جميع الحقوق محفوظة 2023 - نظام POS & ERP
`;
document.body.appendChild(footer);
}
// Initialize the app when the page loads
window.onload = function() {
renderSections();
// Show login screen by default
document.getElementById('loginScreen').classList.remove('hidden');
};