This file contains hidden or 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
class PayeCalculator { | |
constructor(basicSalary, housingAllowance, transportAllowance, otherAllowance) { | |
this.basicSalary = basicSalary; | |
this.housingAllowance = housingAllowance; | |
this.transportAllowance = transportAllowance; | |
this.otherAllowance = otherAllowance; | |
} | |
calculatePension() { | |
const grossIncome = this.basicSalary + this.housingAllowance + this.transportAllowance + this.otherAllowance; |
This file contains hidden or 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
You can use Axios interceptors to automatically append the bearer token from local storage to all outgoing requests. Here's how you can set it up: | |
```javascript | |
import axios from 'axios'; | |
// Create an instance of axios | |
const axiosInstance = axios.create(); | |
// Add a request interceptor | |
axiosInstance.interceptors.request.use( |
This file contains hidden or 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
// SIGN UP | |
// const { mutate: signUp } = trpc.user.signup.useMutation({ | |
// onError: (e) => { | |
// console.log("Error===>", e); | |
// // showAlert(res?.message, 'error'); | |
// }, | |
// onSuccess: () => { | |
// console.log("success"); | |
// // showAlert('Corporate Admin successfully set', 'success'); |
This file contains hidden or 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 APP = { | |
SW: null, | |
init() { | |
//called after DOMContentLoaded | |
if ('serviceWorker' in navigator) { | |
// 1. Register a service worker hosted at the root of the | |
// site using the default scope. | |
navigator.serviceWorker | |
.register('/sw.js', { | |
scope: '/', |
This file contains hidden or 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
AWS SQS Queue Access Policy to Store data to S3 RAW VIDEOS: | |
{ | |
"Version": "2012-10-17", | |
"Id": "__default_policy_ID", | |
"Statement": [ | |
// existing data... add the statement below | |
{ | |
"Effect": "Allow", | |
"Principal": { |
OlderNewer