This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* | |
* jsPDF AutoTable plugin v3.5.14 | |
* | |
* Copyright (c) 2021 Simon Bengtsson, https://github.com/simonbengtsson/jsPDF-AutoTable | |
* Licensed under the MIT License. | |
* http://opensource.org/licenses/mit-license | |
* | |
*/ | |
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(function(){try{return require("jspdf")}catch(t){}}());else if("function"==typeof define&&define.amd)define(["jspdf"],e);else{var n="object"==typeof exports?e(function(){try{return require("jspdf")}catch(t){}}()):e(t.jspdf);for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(void 0!==this?this:window,(function(t){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.jspdf=e()}(this,function(){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e=(function(){function t(t){this.value=t}function e(e){function n(t,e){return new Promise(function(n,i){var s={key:t,arg:e,resolve:n,reject:i,next:null};a?a=a.next=s:(o=a=s,r(t,e))})}function r(n,o){try{var a=e[n](o),s=a.value;s instanceof t?Promise.resolve(s.value).then(function(t){r("next",t)},function(t){r("throw",t)}):i(a.done?"return":"normal",a.value)}catch(t){i("throw",t)}}function i(t,e){switch(t){case"return":o.resolve({value:e,done:!0});break;case"throw":o.reject(e);break;default:o.resolve({value:e,done:!1})}o=o.next,o?r(o.key,o.arg):a=null}var o,a;this._invoke=n,"function"!=typeof e.return&&(this.return=void 0)}return"fu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const gulp = require('gulp'), | |
jeditor = require('gulp-json-editor'); | |
function setLocal(cb) { | |
setVersion('local'); | |
cb(); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from rest_framework.permissions import BasePermission | |
from jose import jwt as jose_jwt,jwk | |
import requests | |
from jose.utils import base64url_decode | |
class Authentication(BasePermission): | |
def has_permission(self, request, view): | |
def get_json(token_claims): | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { prisma } = require('../generated/prisma-client') | |
const { getUserId } = require ('../utils/authentication') | |
//show All employees | |
async function getAllEmployees(req, res){ | |
const userId = await getUserId(req); | |
console.log("userId: ", userId); | |
if (userId == null || userId.message) | |
{ | |
res.send(JSON.stringify({"status": 401, "error": 'JWT expired or not provided', "response": null})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const bcrypt = require('bcrypt'); | |
const jwt = require('jsonwebtoken'); | |
const _ = require('lodash'); | |
const SECRET = 'asbadbbdbbh7788888887hb113h3hbb'; | |
const { prisma } = require('../generated/prisma-client') | |
//add new user | |
async function allUser(req, res){ | |
const allUsers = await prisma.users() | |
res.send(JSON.stringify({"status": 200, "error": null, 'response': allUsers})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { prisma } = require('../generated/prisma-client') | |
const { getUserId } = require ('../utils/authentication'); | |
const { first } = require('lodash'); | |
const { logger } = require('../utils/logging'); | |
//show All company | |
async function getAllCompanys(req, res){ | |
const userId = await getUserId(req); | |
console.log("userId: ", userId); | |
if (userId == null || userId.message) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
const app = express(); | |
const { getAllCompanys, getSingleCompany, addNewCompany, updateCompany, deleteCompany, searchCompany } = require('./APIs/company'); | |
const { getAllEmployees, getSingleEmployee, addNewEmployee, updateEmployee, deleteEmployee } = require('./APIs/employee'); | |
const { register, login, deleteUser, allUser } = require('./APIs/user'); | |
// parse application/json | |
app.use(bodyParser.json()); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
************************************* Get All Companies ********************************************** | |
query{ | |
companies{ | |
id | |
name | |
employees{ | |
id | |
name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() | |
{ | |
runApp | |
( | |
MaterialApp | |
( | |
debugShowCheckedModeBanner: false, | |
home: Scaffold |
NewerOlder