Allow taking attendance if not taken before
This commit is contained in:
Generated
+3
-3
@@ -1330,9 +1330,9 @@
|
||||
}
|
||||
},
|
||||
"@rollup/plugin-typescript": {
|
||||
"version": "8.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.2.5.tgz",
|
||||
"integrity": "sha512-QL/LvDol/PAGB2O0S7/+q2HpSUNodpw7z6nGn9BfoVCPOZ0r4EALrojFU29Bkoi2Hr2jgTocTejJ5GGWZfOxbQ==",
|
||||
"version": "8.3.0",
|
||||
"resolved": "https://flipplib.jfrog.io/artifactory/api/npm/flipp-npm/@rollup/plugin-typescript/-/plugin-typescript-8.3.0.tgz",
|
||||
"integrity": "sha1-vBB3+liXuYD8J+N2xON3iCxj5os=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@rollup/pluginutils": "^3.1.0",
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@
|
||||
"@rollup/plugin-commonjs": "^14.0.0",
|
||||
"@rollup/plugin-node-resolve": "^8.0.0",
|
||||
"@rollup/plugin-replace": "^2.4.2",
|
||||
"@rollup/plugin-typescript": "^8.2.5",
|
||||
"@rollup/plugin-typescript": "^8.3.0",
|
||||
"@tailwindcss/typography": "^0.3.1",
|
||||
"carbon-icons-svelte": "^10.21.0",
|
||||
"dotenv": "^10.0.0",
|
||||
|
||||
@@ -62,6 +62,9 @@
|
||||
? $attendance[student.id][lesson.id] || {}
|
||||
: {};
|
||||
|
||||
/*
|
||||
This validation is useless. We shouldn't assume we already have an attendance item id
|
||||
because it might be a new attendance.
|
||||
if (!attendanceItem.id) {
|
||||
$snackbarStore.open = true;
|
||||
$snackbarStore.severity = SNACKBAR_SEVERITY.ERROR;
|
||||
@@ -71,6 +74,7 @@
|
||||
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
const data = {
|
||||
id: attendanceItem.id,
|
||||
@@ -85,9 +89,10 @@
|
||||
console.error(`res.error`, res.error);
|
||||
$snackbarStore.open = true;
|
||||
$snackbarStore.severity = SNACKBAR_SEVERITY.ERROR;
|
||||
$snackbarStore.message = "Something isn't right.";
|
||||
$snackbarStore.message =
|
||||
"Something isn't right. Please reload and take attendance again";
|
||||
} else {
|
||||
console.log('res', JSON.stringify(res));
|
||||
// console.log('res', JSON.stringify(res));
|
||||
const { id, is_present } = res.data[0];
|
||||
if ($attendance[student.id]) {
|
||||
$attendance[student.id][lesson.id] = {
|
||||
|
||||
Reference in New Issue
Block a user