Initial Project Commit
This commit is contained in:
commit
a6dea9c888
2148 changed files with 173870 additions and 0 deletions
6
src/main/webapp/app/config/authority.constants.ts
Normal file
6
src/main/webapp/app/config/authority.constants.ts
Normal file
|
@ -0,0 +1,6 @@
|
|||
export enum Authority {
|
||||
ADMIN = 'ROLE_ADMIN',
|
||||
MANAGER = 'ROLE_MANAGER',
|
||||
COORDINATOR = 'ROLE_COORDINATOR',
|
||||
USER = 'ROLE_USER',
|
||||
}
|
20
src/main/webapp/app/config/datepicker-adapter.ts
Normal file
20
src/main/webapp/app/config/datepicker-adapter.ts
Normal file
|
@ -0,0 +1,20 @@
|
|||
/**
|
||||
* Angular bootstrap Date adapter
|
||||
*/
|
||||
import { Injectable } from '@angular/core';
|
||||
import { NgbDateAdapter, NgbDateStruct } from '@ng-bootstrap/ng-bootstrap';
|
||||
import dayjs from 'dayjs/esm';
|
||||
|
||||
@Injectable()
|
||||
export class NgbDateDayjsAdapter extends NgbDateAdapter<dayjs.Dayjs> {
|
||||
fromModel(date: dayjs.Dayjs | null): NgbDateStruct | null {
|
||||
if (date && dayjs.isDayjs(date) && date.isValid()) {
|
||||
return { year: date.year(), month: date.month() + 1, day: date.date() };
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
toModel(date: NgbDateStruct | null): dayjs.Dayjs | null {
|
||||
return date ? dayjs(`${date.year}-${date.month}-${date.day}`) : null;
|
||||
}
|
||||
}
|
16
src/main/webapp/app/config/dayjs.ts
Normal file
16
src/main/webapp/app/config/dayjs.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
import dayjs from 'dayjs/esm';
|
||||
import customParseFormat from 'dayjs/esm/plugin/customParseFormat';
|
||||
import duration from 'dayjs/esm/plugin/duration';
|
||||
import relativeTime from 'dayjs/esm/plugin/relativeTime';
|
||||
|
||||
// jhipster-needle-i18n-language-dayjs-imports - JHipster will import languages from dayjs here
|
||||
import 'dayjs/esm/locale/pt';
|
||||
import 'dayjs/esm/locale/en';
|
||||
|
||||
// DAYJS CONFIGURATION
|
||||
dayjs.extend(customParseFormat);
|
||||
dayjs.extend(duration);
|
||||
dayjs.extend(relativeTime);
|
||||
|
||||
// Named export
|
||||
export { dayjs };
|
3
src/main/webapp/app/config/error.constants.ts
Normal file
3
src/main/webapp/app/config/error.constants.ts
Normal file
|
@ -0,0 +1,3 @@
|
|||
export const PROBLEM_BASE_URL = 'https://www.jhipster.tech/problem';
|
||||
export const EMAIL_ALREADY_USED_TYPE = `${PROBLEM_BASE_URL}/email-already-used`;
|
||||
export const LOGIN_ALREADY_USED_TYPE = `${PROBLEM_BASE_URL}/login-already-used`;
|
109
src/main/webapp/app/config/font-awesome-icons.ts
Normal file
109
src/main/webapp/app/config/font-awesome-icons.ts
Normal file
|
@ -0,0 +1,109 @@
|
|||
import {
|
||||
faArrowLeft,
|
||||
faAsterisk,
|
||||
faBan,
|
||||
faBars,
|
||||
faBell,
|
||||
faBook,
|
||||
faCalendarAlt,
|
||||
faCheck,
|
||||
faCircleQuestion,
|
||||
faCloud,
|
||||
faCogs,
|
||||
faDatabase,
|
||||
faEye,
|
||||
faFlag,
|
||||
faHeart,
|
||||
faHome,
|
||||
faList,
|
||||
faLock,
|
||||
faQuestion,
|
||||
faPencilAlt,
|
||||
faPlus,
|
||||
faRoad,
|
||||
faSave,
|
||||
faSearch,
|
||||
faSignOutAlt,
|
||||
faSignInAlt,
|
||||
faSitemap,
|
||||
faSort,
|
||||
faSortDown,
|
||||
faSortUp,
|
||||
faSync,
|
||||
faTachometerAlt,
|
||||
faTasks,
|
||||
faThList,
|
||||
faTimes,
|
||||
faTrashAlt,
|
||||
faUser,
|
||||
faUserPlus,
|
||||
faUsers,
|
||||
faUsersCog,
|
||||
faWrench,
|
||||
faCaretDown,
|
||||
faCaretUp,
|
||||
faSquareMinus,
|
||||
faSquare,
|
||||
faSquareCheck,
|
||||
faXmark,
|
||||
faCircle,
|
||||
faGear,
|
||||
faFileExcel,
|
||||
faFilePdf,
|
||||
// jhipster-needle-add-icon-import
|
||||
} from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
export const fontAwesomeIcons = [
|
||||
faArrowLeft,
|
||||
faAsterisk,
|
||||
faBan,
|
||||
faBars,
|
||||
faBell,
|
||||
faBook,
|
||||
faCalendarAlt,
|
||||
faCheck,
|
||||
faCircleQuestion,
|
||||
faCloud,
|
||||
faCogs,
|
||||
faDatabase,
|
||||
faEye,
|
||||
faFlag,
|
||||
faHeart,
|
||||
faHome,
|
||||
faList,
|
||||
faLock,
|
||||
faQuestion,
|
||||
faPencilAlt,
|
||||
faPlus,
|
||||
faRoad,
|
||||
faSave,
|
||||
faSearch,
|
||||
faSignOutAlt,
|
||||
faSignInAlt,
|
||||
faSitemap,
|
||||
faSort,
|
||||
faSortDown,
|
||||
faSortUp,
|
||||
faSync,
|
||||
faTachometerAlt,
|
||||
faTasks,
|
||||
faThList,
|
||||
faTimes,
|
||||
faTrashAlt,
|
||||
faUser,
|
||||
faUserPlus,
|
||||
faUsers,
|
||||
faUsersCog,
|
||||
faWrench,
|
||||
faCaretDown,
|
||||
faCaretUp,
|
||||
faSquareMinus,
|
||||
faSquare,
|
||||
faSquareCheck,
|
||||
faXmark,
|
||||
faCircle,
|
||||
faGear,
|
||||
faFileExcel,
|
||||
faFilePdf,
|
||||
// jhipster-needle-add-icon-import
|
||||
];
|
2
src/main/webapp/app/config/input.constants.ts
Normal file
2
src/main/webapp/app/config/input.constants.ts
Normal file
|
@ -0,0 +1,2 @@
|
|||
export const DATE_FORMAT = 'YYYY-MM-DD';
|
||||
export const DATE_TIME_FORMAT = 'YYYY-MM-DDTHH:mm';
|
9
src/main/webapp/app/config/language.constants.ts
Normal file
9
src/main/webapp/app/config/language.constants.ts
Normal file
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
Languages codes are ISO_639-1 codes, see http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
|
||||
They are written in English to avoid character encoding issues (not a perfect solution)
|
||||
*/
|
||||
export const LANGUAGES: string[] = [
|
||||
'pt-pt',
|
||||
'en',
|
||||
// jhipster-needle-i18n-language-constant - JHipster will add/remove languages in this array
|
||||
];
|
5
src/main/webapp/app/config/navigation.constants.ts
Normal file
5
src/main/webapp/app/config/navigation.constants.ts
Normal file
|
@ -0,0 +1,5 @@
|
|||
export const ASC = 'asc';
|
||||
export const DESC = 'desc';
|
||||
export const SORT = 'sort';
|
||||
export const ITEM_DELETED_EVENT = 'deleted';
|
||||
export const DEFAULT_SORT_DATA = 'defaultSort';
|
3
src/main/webapp/app/config/pagination.constants.ts
Normal file
3
src/main/webapp/app/config/pagination.constants.ts
Normal file
|
@ -0,0 +1,3 @@
|
|||
export const TOTAL_COUNT_RESPONSE_HEADER = 'X-Total-Count';
|
||||
export const PAGE_HEADER = 'page';
|
||||
export const ITEMS_PER_PAGE = 20;
|
20
src/main/webapp/app/config/translation.config.ts
Normal file
20
src/main/webapp/app/config/translation.config.ts
Normal file
|
@ -0,0 +1,20 @@
|
|||
import { HttpClient } from '@angular/common/http';
|
||||
import { MissingTranslationHandler, MissingTranslationHandlerParams, TranslateLoader } from '@ngx-translate/core';
|
||||
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
||||
|
||||
export const translationNotFoundMessage = 'translation-not-found';
|
||||
|
||||
export class MissingTranslationHandlerImpl implements MissingTranslationHandler {
|
||||
handle(params: MissingTranslationHandlerParams): string {
|
||||
const key = params.key;
|
||||
return `${translationNotFoundMessage}[${key}]`;
|
||||
}
|
||||
}
|
||||
|
||||
export function translatePartialLoader(http: HttpClient): TranslateLoader {
|
||||
return new TranslateHttpLoader(http, 'i18n/', `.json?_=${I18N_HASH}`);
|
||||
}
|
||||
|
||||
export function missingTranslationHandler(): MissingTranslationHandler {
|
||||
return new MissingTranslationHandlerImpl();
|
||||
}
|
15
src/main/webapp/app/config/uib-pagination.config.ts
Normal file
15
src/main/webapp/app/config/uib-pagination.config.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { inject, Injectable } from '@angular/core';
|
||||
import { NgbPaginationConfig } from '@ng-bootstrap/ng-bootstrap';
|
||||
|
||||
import { ITEMS_PER_PAGE } from 'app/config/pagination.constants';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class PaginationConfig {
|
||||
private config = inject(NgbPaginationConfig);
|
||||
constructor() {
|
||||
this.config.boundaryLinks = true;
|
||||
this.config.maxSize = 5;
|
||||
this.config.pageSize = ITEMS_PER_PAGE;
|
||||
this.config.size = 'sm';
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue