- Create Firebase Project
- Create "web" app within firebase to get config values"
- Install firebase in your project "npm i firebase
- Create a config file in your project
- Add authentication for email/password and Google
- Create a user from Firebase
- Enable Firestore
- Add rules for firestore
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 arr = [1, 2, 3, 4, 5, 6]; | |
let newArr = []; | |
const spliceArray = (originalArr, newArr, groupLength) => { | |
newArr.push(originalArr.splice(0, groupLength)); | |
return originalArr.length === 0 | |
? newArr | |
: spliceArray(originalArr, newArr, groupLength); | |
}; |
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
/** | |
* Download document into desktop | |
* @param base64 Document in base64 format | |
* @param documentName Document Name | |
*/ | |
export function downloadPDF(base64: string, documentName: string) { | |
const documentType = getDocumentType(base64); | |
const linkSource = `data:${documentType};base64,${base64}`; | |
const downloadLink = document.createElement('a'); | |
const fileName = documentName; |
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 validateNIF(nif:string){ | |
const digitRegex:RegExp = new RegExp(/\d+/); | |
const letterRegex:RegExp = new RegExp(/[A-Z]/); | |
const nifRegex: RegExp = new RegExp(/^\d{8}[a-zA-Z]$/); | |
const letters = ['T', 'R', 'W', 'A', 'G', 'M', 'Y', 'F', 'P', 'D', 'X', 'B', 'N', 'J', 'Z', 'S', 'Q', 'V', 'H', 'L', 'C', 'K', 'E', 'T']; | |
// ** Check if NIF has the correct format | |
if(!nifRegex.test(nif)){ | |
return false; |
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
.c-form { | |
.ui-inputtext { | |
width: 100%; | |
} | |
.ui-dropdown .ui-dropdown-panel { | |
min-width: 100%; | |
width: max-content; | |
} |
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
.u-no-select { | |
-webkit-user-select: none; | |
-moz-user-select: none; | |
-ms-user-select: none; | |
user-select: none; | |
} |
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
.u-disable-touch { | |
// -webkit-tap-highlight-color: rgba(0,0,0,0); | |
-webkit-tap-highlight-color: transparent; | |
} |
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
*, | |
*::after, | |
*::before { | |
margin: 0; | |
padding: 0; | |
/* Hereda del body la propiedad */ | |
box-sizing: inherit; | |
} | |
html { |
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
"nghm": "node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng serve" |
NewerOlder