lrf402788946 4 anos atrás
pai
commit
2a2bf58e67
1 arquivos alterados com 15 adições e 15 exclusões
  1. 15 15
      app/service/attendance.js

+ 15 - 15
app/service/attendance.js

@@ -216,21 +216,21 @@ class AttendanceService extends CrudService {
             res = 1;
           }
         }
-      } else if (type === '1') {
-        const bd_start = nowdata.substr(0, 10) + ' ' + setting.bd_start + ':00';
-        const bd_end = nowdata.substr(0, 10) + ' ' + setting.bd_end + ':00';
-        const resstart = moment(nowdata).diff(moment(bd_start), 'minutes');
-        const resend = moment(nowdata).diff(moment(bd_end), 'minutes');
-        console.log(bd_start);
-        console.log(bd_end);
-        console.log(resstart);
-        console.log(resend);
-        if (resstart > 0) {
-          if (resend > 0) {
-            res = 2;
-          } else {
-            res = 1;
-          }
+      }
+    } else if (type === '1') {
+      const bd_start = nowdata.substr(0, 10) + ' ' + setting.bd_start + ':00';
+      const bd_end = nowdata.substr(0, 10) + ' ' + setting.bd_end + ':00';
+      const resstart = moment(nowdata).diff(moment(bd_start), 'minutes');
+      const resend = moment(nowdata).diff(moment(bd_end), 'minutes');
+      console.log(bd_start);
+      console.log(bd_end);
+      console.log(resstart);
+      console.log(resend);
+      if (resstart > 0) {
+        if (resend > 0) {
+          res = 2;
+        } else {
+          res = 1;
         }
       }
     }