Hari-Prasath-M91 commited on
Commit
cd1c3e0
·
1 Parent(s): 6b3d64c
Files changed (1) hide show
  1. app.py +15 -4
app.py CHANGED
@@ -1288,7 +1288,13 @@ def task_form():
1288
  <title>Task Scheduler</title>
1289
  <style>
1290
  body { font-family: Arial; padding: 20px; }
1291
- .subject-block, .task-block { border: 1px solid #ccc; padding: 15px; margin-top: 10px; border-radius: 5px; position: relative; }
 
 
 
 
 
 
1292
  .task-block { margin-left: 20px; }
1293
  .remove-btn {
1294
  position: absolute;
@@ -1303,6 +1309,11 @@ def task_form():
1303
  font-weight: bold;
1304
  cursor: pointer;
1305
  }
 
 
 
 
 
1306
  </style>
1307
  </head>
1308
  <body>
@@ -1356,8 +1367,8 @@ def task_form():
1356
  taskBlock.innerHTML = `
1357
  <button class="remove-btn" onclick="this.parentElement.remove()">✕</button>
1358
  Chapter: <input type="text" class="chapter">
1359
- Description: <input type="text" class="description">
1360
- Time (hrs): <input type="number" class="time" min="1">
1361
  `;
1362
  container.appendChild(taskBlock);
1363
  }
@@ -1376,7 +1387,7 @@ def task_form():
1376
  const tasks = Array.from(taskElements).map(task => ({
1377
  chapter: task.querySelector('.chapter').value,
1378
  description: task.querySelector('.description').value,
1379
- estimated_time: parseInt(task.querySelector('.time').value)
1380
  }));
1381
 
1382
  if (tasks.length > 0) {
 
1288
  <title>Task Scheduler</title>
1289
  <style>
1290
  body { font-family: Arial; padding: 20px; }
1291
+ .subject-block, .task-block {
1292
+ border: 1px solid #ccc;
1293
+ padding: 15px;
1294
+ margin-top: 10px;
1295
+ border-radius: 5px;
1296
+ position: relative;
1297
+ }
1298
  .task-block { margin-left: 20px; }
1299
  .remove-btn {
1300
  position: absolute;
 
1309
  font-weight: bold;
1310
  cursor: pointer;
1311
  }
1312
+ textarea.description {
1313
+ width: 300px;
1314
+ height: 60px;
1315
+ resize: vertical;
1316
+ }
1317
  </style>
1318
  </head>
1319
  <body>
 
1367
  taskBlock.innerHTML = `
1368
  <button class="remove-btn" onclick="this.parentElement.remove()">✕</button>
1369
  Chapter: <input type="text" class="chapter">
1370
+ Description: <textarea class="description"></textarea>
1371
+ Time (hrs): <input type="number" class="time" min="0.1" step="0.1">
1372
  `;
1373
  container.appendChild(taskBlock);
1374
  }
 
1387
  const tasks = Array.from(taskElements).map(task => ({
1388
  chapter: task.querySelector('.chapter').value,
1389
  description: task.querySelector('.description').value,
1390
+ estimated_time: Math.round(parseFloat(task.querySelector('.time').value) * 100) / 100
1391
  }));
1392
 
1393
  if (tasks.length > 0) {