feat: add empresa and contatos

- Introduced a new utility function `maskCNPJ` for formatting CNPJ values.
- Updated the dashboard pages to replace icons and improve layout, including the addition of a link to manage companies.
- Enhanced the display of upcoming features for both the Licitações and Programas Esportivos modules, indicating their development status.
This commit is contained in:
2025-11-17 15:45:48 -03:00
parent 33a9c9e81d
commit 2b94b56f6e
9 changed files with 936 additions and 97 deletions

View File

@@ -43,6 +43,16 @@ export const maskCEP = (value: string): string => {
return digits.replace(/(\d{5})(\d{1,3})$/, "$1-$2");
};
/** Format CNPJ: 00.000.000/0000-00 */
export const maskCNPJ = (value: string): string => {
const digits = onlyDigits(value).slice(0, 14);
return digits
.replace(/(\d{2})(\d)/, "$1.$2")
.replace(/(\d{3})(\d)/, "$1.$2")
.replace(/(\d{3})(\d)/, "$1/$2")
.replace(/(\d{4})(\d{1,2})$/, "$1-$2");
};
/** Format phone: (00) 0000-0000 or (00) 00000-0000 */
export const maskPhone = (value: string): string => {
const digits = onlyDigits(value).slice(0, 11);