Changes to stockwise1.scroll.pub

root
root
22 days ago
Initial commit
body.html
Changed around line 1
+
+

StockWise

+

Smart Inventory & Order Management

+
+
+
+
+
+
+
+
+
+
+ Item
+ Factory
+ Cost
+ Price
+ Stock
+ Actions
+
+
+
+
+
+
+

Edit Item

+
+ Item Name:
+
+
+
+ Factory:
+
+
+
+ Cost Price:
+
+
+
+ Sell Price:
+
+
+
+ Stock Count:
+
+
+
+
+
+
+
+
+
+
+
+

Simplify your inventory management with StockWise

+
index.scroll
Changed around line 1
+ buildHtml
+ baseUrl https://stockwise.scroll.pub
+ metaTags
+ editButton /edit.html
+ title StockWise - Smart Inventory Management
+ style.css
+ body.html
+ script.js
prompt.json
Changed around line 1
+ {
+ "id": "7972981e-9133-44ad-b395-95c9b5ee7211",
+ "object": "chat.completion",
+ "created": 1735663889,
+ "model": "deepseek-chat",
+ "choices": [
+ {
+ "index": 0,
+ "message": {
+ "role": "assistant",
+ "content": "---domain---\nstockwise.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://stockwise.scroll.pub\nmetaTags\neditButton /edit.html\ntitle StockWise - Smart Inventory Management\nstyle.css\nbody.html\nscript.js\n---body.html---\n
\n

StockWise

\n

Smart Inventory & Order Management

\n
\n\n
\n
\n \n \n
\n\n
\n
\n Item\n Factory\n Cost\n Price\n Stock\n Actions\n
\n
\n
\n\n \n
\n

Edit Item

\n \n \n \n \n \n
\n \n \n
\n
\n
\n
\n\n
\n

Simplify your inventory management with StockWise

\n
\n---style.css---\n:root {\n --primary: #2563eb;\n --primary-hover: #1d4ed8;\n --background: #f8fafc;\n --text: #1e293b;\n --border: #e2e8f0;\n --shadow: 0 1px 3px rgba(0,0,0,0.1);\n}\n\nbody {\n font-family: system-ui, -apple-system, sans-serif;\n background: var(--background);\n color: var(--text);\n margin: 0;\n padding: 20px;\n line-height: 1.5;\n}\n\nheader {\n text-align: center;\n margin-bottom: 2rem;\n}\n\nheader h1 {\n font-size: 2.5rem;\n color: var(--primary);\n margin: 0;\n}\n\nheader p {\n color: #64748b;\n margin: 0.5rem 0 0;\n}\n\n.controls {\n display: flex;\n gap: 1rem;\n margin-bottom: 2rem;\n}\n\n#addItem {\n background: var(--primary);\n color: white;\n border: none;\n padding: 0.75rem 1.5rem;\n border-radius: 0.5rem;\n cursor: pointer;\n transition: background 0.2s;\n}\n\n#addItem:hover {\n background: var(--primary-hover);\n}\n\n#search {\n flex: 1;\n padding: 0.75rem;\n border: 1px solid var(--border);\n border-radius: 0.5rem;\n}\n\n.inventory {\n background: white;\n border-radius: 0.5rem;\n box-shadow: var(--shadow);\n overflow: hidden;\n}\n\n.table-header {\n display: grid;\n grid-template-columns: 2fr 1.5fr 1fr 1fr 1fr 1fr;\n gap: 1rem;\n padding: 1rem;\n background: var(--background);\n font-weight: 600;\n border-bottom: 1px solid var(--border);\n}\n\n#inventoryList {\n display: flex;\n flex-direction: column;\n}\n\n.item-row {\n display: grid;\n grid-template-columns: 2fr 1.5fr 1fr 1fr 1fr 1fr;\n gap: 1rem;\n padding: 1rem;\n border-bottom: 1px solid var(--border);\n align-items: center;\n}\n\n.item-row:last-child {\n border-bottom: none;\n}\n\n.item-row button {\n background: none;\n border: 1px solid var(--border);\n padding: 0.5rem;\n border-radius: 0.25rem;\n cursor: pointer;\n transition: all 0.2s;\n}\n\n.item-row button:hover {\n background: var(--background);\n}\n\ndialog {\n border: none;\n border-radius: 0.5rem;\n box-shadow: var(--shadow);\n width: min(90%, 400px);\n padding: 2rem;\n}\n\ndialog::backdrop {\n background: rgba(0,0,0,0.5);\n}\n\n.form-buttons {\n display: flex;\n gap: 1rem;\n margin-top: 1.5rem;\n}\n\nfooter {\n text-align: center;\n margin-top: 2rem;\n color: #64748b;\n}\n\n@media (max-width: 768px) {\n .table-header, .item-row {\n grid-template-columns: repeat(3, 1fr);\n }\n \n .table-header span:nth-child(4),\n .table-header span:nth-child(5),\n .item-row > div:nth-child(4),\n .item-row > div:nth-child(5) {\n display: none;\n }\n}\n---script.js---\nlet inventory = [];\nlet currentEditIndex = null;\n\nconst inventoryList = document.getElementById('inventoryList');\nconst itemModal = document.getElementById('itemModal');\nconst itemForm = document.getElementById('itemForm');\nconst addItemBtn = document.getElementById('addItem');\nconst cancelBtn = document.getElementById('cancelBtn');\nconst searchInput = document.getElementById('search');\n\nfunction renderInventory() {\n inventoryList.innerHTML = '';\n inventory.forEach((item, index) => {\n const itemRow = document.createElement('div');\n itemRow.className = 'item-row';\n itemRow.innerHTML = `\n
${item.name}
\n
${item.factory}
\n
$${item.cost.toFixed(2)}
\n
$${item.price.toFixed(2)}
\n
${item.stock}
\n
\n \n \n
\n `;\n inventoryList.appendChild(itemRow);\n });\n}\n\nfunction addItem(item) {\n inventory.push(item);\n renderInventory();\n}\n\nfunction editItem(index) {\n currentEditIndex = index;\n const item = inventory[index];\n itemForm.name.value = item.name;\n itemForm.factory.value = item.factory;\n itemForm.cost.value = item.cost;\n itemForm.price.value = item.price;\n itemForm.stock.value = item.stock;\n itemModal.showModal();\n}\n\nfunction deleteItem(index) {\n inventory.splice(index, 1);\n renderInventory();\n}\n\nitemForm.addEventListener('submit', (e) => {\n e.preventDefault();\n const item = {\n name: itemForm.name.value,\n factory: itemForm.factory.value,\n cost: parseFloat(itemForm.cost.value),\n price: parseFloat(itemForm.price.value),\n stock: parseInt(itemForm.stock.value)\n };\n \n if (currentEditIndex !== null) {\n inventory[currentEditIndex] = item;\n currentEditIndex = null;\n } else {\n addItem(item);\n }\n \n itemModal.close();\n renderInventory();\n itemForm.reset();\n});\n\naddItemBtn.addEventListener('click', () => {\n currentEditIndex = null;\n itemModal.showModal();\n});\n\ncancelBtn.addEventListener('click', () => {\n itemModal.close();\n itemForm.reset();\n});\n\nsearchInput.addEventListener('input', () => {\n const searchTerm = searchInput.value.toLowerCase();\n const filtered = inventory.filter(item => \n item.name.toLowerCase().includes(searchTerm) ||\n item.factory.toLowerCase().includes(searchTerm)\n );\n inventoryList.innerHTML = '';\n filtered.forEach((item, index) => {\n const itemRow = document.createElement('div');\n itemRow.className = 'item-row';\n itemRow.innerHTML = `\n
${item.name}
\n
${item.factory}
\n
$${item.cost.toFixed(2)}
\n
$${item.price.toFixed(2)}
\n
${item.stock}
\n
\n \n \n
\n `;\n inventoryList.appendChild(itemRow);\n });\n});\n\n// Initial render\nrenderInventory();\n---end---"
+ },
+ "logprobs": null,
+ "finish_reason": "stop"
+ }
+ ],
+ "usage": {
+ "prompt_tokens": 277,
+ "completion_tokens": 2025,
+ "total_tokens": 2302,
+ "prompt_cache_hit_tokens": 0,
+ "prompt_cache_miss_tokens": 277
+ },
+ "system_fingerprint": "fp_f1afce2943"
+ }
readme.scroll
Changed around line 1
+ # stockwise1.scroll.pub
+ Website generated by DeepSeek from prompt: a website for ecommerce order and inventory management, i can add delete and edti entries of each items. i can log and track the cost and sell price, change of counts, and which factory they are from.
script.js
Changed around line 1
+ let inventory = [];
+ let currentEditIndex = null;
+
+ const inventoryList = document.getElementById('inventoryList');
+ const itemModal = document.getElementById('itemModal');
+ const itemForm = document.getElementById('itemForm');
+ const addItemBtn = document.getElementById('addItem');
+ const cancelBtn = document.getElementById('cancelBtn');
+ const searchInput = document.getElementById('search');
+
+ function renderInventory() {
+ inventoryList.innerHTML = '';
+ inventory.forEach((item, index) => {
+ const itemRow = document.createElement('div');
+ itemRow.className = 'item-row';
+ itemRow.innerHTML = `
+
${item.name}
+
${item.factory}
+
$${item.cost.toFixed(2)}
+
$${item.price.toFixed(2)}
+
${item.stock}
+
+
+
+
+ `;
+ inventoryList.appendChild(itemRow);
+ });
+ }
+
+ function addItem(item) {
+ inventory.push(item);
+ renderInventory();
+ }
+
+ function editItem(index) {
+ currentEditIndex = index;
+ const item = inventory[index];
+ itemForm.name.value = item.name;
+ itemForm.factory.value = item.factory;
+ itemForm.cost.value = item.cost;
+ itemForm.price.value = item.price;
+ itemForm.stock.value = item.stock;
+ itemModal.showModal();
+ }
+
+ function deleteItem(index) {
+ inventory.splice(index, 1);
+ renderInventory();
+ }
+
+ itemForm.addEventListener('submit', (e) => {
+ e.preventDefault();
+ const item = {
+ name: itemForm.name.value,
+ factory: itemForm.factory.value,
+ cost: parseFloat(itemForm.cost.value),
+ price: parseFloat(itemForm.price.value),
+ stock: parseInt(itemForm.stock.value)
+ };
+
+ if (currentEditIndex !== null) {
+ inventory[currentEditIndex] = item;
+ currentEditIndex = null;
+ } else {
+ addItem(item);
+ }
+
+ itemModal.close();
+ renderInventory();
+ itemForm.reset();
+ });
+
+ addItemBtn.addEventListener('click', () => {
+ currentEditIndex = null;
+ itemModal.showModal();
+ });
+
+ cancelBtn.addEventListener('click', () => {
+ itemModal.close();
+ itemForm.reset();
+ });
+
+ searchInput.addEventListener('input', () => {
+ const searchTerm = searchInput.value.toLowerCase();
+ const filtered = inventory.filter(item =>
+ item.name.toLowerCase().includes(searchTerm) ||
+ item.factory.toLowerCase().includes(searchTerm)
+ );
+ inventoryList.innerHTML = '';
+ filtered.forEach((item, index) => {
+ const itemRow = document.createElement('div');
+ itemRow.className = 'item-row';
+ itemRow.innerHTML = `
+
${item.name}
+
${item.factory}
+
$${item.cost.toFixed(2)}
+
$${item.price.toFixed(2)}
+
${item.stock}
+
+
+
+
+ `;
+ inventoryList.appendChild(itemRow);
+ });
+ });
+
+ // Initial render
+ renderInventory();
style.css
Changed around line 1
+ :root {
+ --primary: #2563eb;
+ --primary-hover: #1d4ed8;
+ --background: #f8fafc;
+ --text: #1e293b;
+ --border: #e2e8f0;
+ --shadow: 0 1px 3px rgba(0,0,0,0.1);
+ }
+
+ body {
+ font-family: system-ui, -apple-system, sans-serif;
+ background: var(--background);
+ color: var(--text);
+ margin: 0;
+ padding: 20px;
+ line-height: 1.5;
+ }
+
+ header {
+ text-align: center;
+ margin-bottom: 2rem;
+ }
+
+ header h1 {
+ font-size: 2.5rem;
+ color: var(--primary);
+ margin: 0;
+ }
+
+ header p {
+ color: #64748b;
+ margin: 0.5rem 0 0;
+ }
+
+ .controls {
+ display: flex;
+ gap: 1rem;
+ margin-bottom: 2rem;
+ }
+
+ #addItem {
+ background: var(--primary);
+ color: white;
+ border: none;
+ padding: 0.75rem 1.5rem;
+ border-radius: 0.5rem;
+ cursor: pointer;
+ transition: background 0.2s;
+ }
+
+ #addItem:hover {
+ background: var(--primary-hover);
+ }
+
+ #search {
+ flex: 1;
+ padding: 0.75rem;
+ border: 1px solid var(--border);
+ border-radius: 0.5rem;
+ }
+
+ .inventory {
+ background: white;
+ border-radius: 0.5rem;
+ box-shadow: var(--shadow);
+ overflow: hidden;
+ }
+
+ .table-header {
+ display: grid;
+ grid-template-columns: 2fr 1.5fr 1fr 1fr 1fr 1fr;
+ gap: 1rem;
+ padding: 1rem;
+ background: var(--background);
+ font-weight: 600;
+ border-bottom: 1px solid var(--border);
+ }
+
+ #inventoryList {
+ display: flex;
+ flex-direction: column;
+ }
+
+ .item-row {
+ display: grid;
+ grid-template-columns: 2fr 1.5fr 1fr 1fr 1fr 1fr;
+ gap: 1rem;
+ padding: 1rem;
+ border-bottom: 1px solid var(--border);
+ align-items: center;
+ }
+
+ .item-row:last-child {
+ border-bottom: none;
+ }
+
+ .item-row button {
+ background: none;
+ border: 1px solid var(--border);
+ padding: 0.5rem;
+ border-radius: 0.25rem;
+ cursor: pointer;
+ transition: all 0.2s;
+ }
+
+ .item-row button:hover {
+ background: var(--background);
+ }
+
+ dialog {
+ border: none;
+ border-radius: 0.5rem;
+ box-shadow: var(--shadow);
+ width: min(90%, 400px);
+ padding: 2rem;
+ }
+
+ dialog::backdrop {
+ background: rgba(0,0,0,0.5);
+ }
+
+ .form-buttons {
+ display: flex;
+ gap: 1rem;
+ margin-top: 1.5rem;
+ }
+
+ footer {
+ text-align: center;
+ margin-top: 2rem;
+ color: #64748b;
+ }
+
+ @media (max-width: 768px) {
+ .table-header, .item-row {
+ grid-template-columns: repeat(3, 1fr);
+ }
+
+ .table-header span:nth-child(4),
+ .table-header span:nth-child(5),
+ .item-row > div:nth-child(4),
+ .item-row > div:nth-child(5) {
+ display: none;
+ }
+ }