First Committ
This commit is contained in:
5
src/model/BookingStore.ts
Executable file
5
src/model/BookingStore.ts
Executable file
@@ -0,0 +1,5 @@
|
||||
import { IEvents } from '@src/model/Calendar'
|
||||
|
||||
export interface IBookingState {
|
||||
bookinglist: IEvents[]
|
||||
}
|
||||
114
src/model/Calendar.ts
Executable file
114
src/model/Calendar.ts
Executable file
@@ -0,0 +1,114 @@
|
||||
import { IInternalPage, IMyPage, IOperators } from '@src/model/GlobalStore'
|
||||
|
||||
export interface IEvents {
|
||||
_id?: any
|
||||
typol?: string
|
||||
short_tit?: string
|
||||
title?: string
|
||||
details?: string
|
||||
bodytext?: string
|
||||
dateTimeStart?: Date
|
||||
dateTimeEnd?: Date
|
||||
side?: string
|
||||
bgcolor?: string
|
||||
icon?: string
|
||||
img?: string
|
||||
img_small?: string
|
||||
wherecode?: string
|
||||
contribtype?: string
|
||||
price?: number
|
||||
infoafterprice?: string
|
||||
teacher?: string
|
||||
teacher2?: string
|
||||
teacher3?: string
|
||||
teacher4?: string
|
||||
infoextra?: string
|
||||
linkpage?: string
|
||||
pagefooter?: IInternalPage[]
|
||||
linkpdf?: string
|
||||
nobookable?: boolean
|
||||
lunchAvailable?: boolean
|
||||
dinnerAvailable?: boolean
|
||||
dinnerSharedAvailable?: boolean
|
||||
lunchType?: number
|
||||
dinnerType?: number
|
||||
lunchPrice?: number
|
||||
dinnerPrice?: number
|
||||
internal?: boolean
|
||||
note?: string
|
||||
news?: boolean
|
||||
facebook?: string
|
||||
canceled?: boolean
|
||||
deleted?: boolean
|
||||
dupId?: any
|
||||
modified?: boolean
|
||||
}
|
||||
|
||||
export interface IBookedEvent {
|
||||
_id?: any
|
||||
userId: string
|
||||
id_bookedevent?: any
|
||||
numpeople: number
|
||||
numpeopleLunch?: number
|
||||
numpeopleDinner?: number
|
||||
numpeopleDinnerShared?: number
|
||||
infoevent: string
|
||||
msgbooking: string
|
||||
datebooked?: Date
|
||||
modified: boolean
|
||||
booked: boolean
|
||||
}
|
||||
|
||||
export interface IWheres {
|
||||
code: string
|
||||
placename: string
|
||||
whereicon: string
|
||||
}
|
||||
|
||||
export interface IContribtype {
|
||||
_id: any
|
||||
label: string
|
||||
showprice: boolean
|
||||
}
|
||||
|
||||
export enum EState {
|
||||
None, Creating, Modifying,
|
||||
}
|
||||
|
||||
export interface IBookedEventPage {
|
||||
show: boolean
|
||||
bookedevent: IBookedEvent
|
||||
state: EState
|
||||
}
|
||||
|
||||
export interface ICalendarState {
|
||||
editable: boolean
|
||||
eventlist: IEvents[]
|
||||
bookedevent: IBookedEvent[]
|
||||
operators: IOperators[]
|
||||
internalpages: IMyPage[]
|
||||
wheres: IWheres[]
|
||||
contribtype: IContribtype[]
|
||||
// ---------------
|
||||
titlebarHeight: number
|
||||
locale: string,
|
||||
maxDays: number,
|
||||
fiveDayWorkWeek: boolean,
|
||||
shortMonthLabel: boolean,
|
||||
showDayOfYearLabel: boolean,
|
||||
shortWeekdayLabel: boolean,
|
||||
shortIntervalLabel: boolean,
|
||||
hour24Format: boolean,
|
||||
hideHeader: boolean,
|
||||
noScroll: boolean,
|
||||
showMonthLabel: boolean,
|
||||
showWorkWeeks: boolean,
|
||||
intervalRange: { min: number, max: number },
|
||||
intervalRangeStep: number,
|
||||
intervalHeight: number,
|
||||
resourceHeight: number,
|
||||
resourceWidth: number,
|
||||
dayHeight: number,
|
||||
enableThemes: boolean,
|
||||
theme: {}
|
||||
}
|
||||
7
src/model/Categories.ts
Executable file
7
src/model/Categories.ts
Executable file
@@ -0,0 +1,7 @@
|
||||
export interface ICategory {
|
||||
id?: number,
|
||||
descr_it?: string
|
||||
descr_en?: string
|
||||
descr_es?: string
|
||||
campo2bool: boolean
|
||||
}
|
||||
18
src/model/Estimate.ts
Executable file
18
src/model/Estimate.ts
Executable file
@@ -0,0 +1,18 @@
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
|
||||
export interface IEstimate {
|
||||
id?: number
|
||||
title: string
|
||||
advanced?: boolean
|
||||
description?: string
|
||||
viewlist?: number[]
|
||||
listsel?: number
|
||||
qtaName?: string
|
||||
icon?: string
|
||||
numpag?: number
|
||||
qta?: number
|
||||
price?: number
|
||||
pricebase?: number
|
||||
checksel?: boolean
|
||||
}
|
||||
510
src/model/GlobalStore.ts
Executable file
510
src/model/GlobalStore.ts
Executable file
@@ -0,0 +1,510 @@
|
||||
import { IAction } from '@src/model/Projects'
|
||||
import { IPaymentType } from '@src/model/UserStore'
|
||||
import {
|
||||
ICart, IDepartment, IProducer, IProduct, IShareWithUs, IStorehouse,
|
||||
} from '@src/model/Products'
|
||||
|
||||
export interface IPost {
|
||||
title: string
|
||||
}
|
||||
|
||||
export interface IConnData {
|
||||
downloading_server: number
|
||||
downloading_indexeddb: number
|
||||
uploading_server: number
|
||||
uploading_indexeddb: number
|
||||
}
|
||||
|
||||
export interface ICfgServer {
|
||||
chiave: string
|
||||
idapp: string
|
||||
userId: string
|
||||
valore: string
|
||||
}
|
||||
|
||||
export interface ICfgData {
|
||||
_id?: string
|
||||
lang?: string
|
||||
token?: string
|
||||
userId?: string
|
||||
}
|
||||
|
||||
export interface ITemplEmail {
|
||||
_id?: string
|
||||
subject?: string
|
||||
content?: string
|
||||
options?: ISettings[]
|
||||
}
|
||||
|
||||
export interface ISettings {
|
||||
_id?: string
|
||||
idapp?: string
|
||||
key?: string
|
||||
type?: number
|
||||
value_str?: string
|
||||
value_date?: Date,
|
||||
value_num?: number
|
||||
value_bool?: boolean
|
||||
serv?: boolean
|
||||
}
|
||||
|
||||
export interface ITeachUname {
|
||||
username?: string
|
||||
}
|
||||
|
||||
export interface IInternalPage {
|
||||
path?: string
|
||||
}
|
||||
|
||||
export interface IResp {
|
||||
_id?: string
|
||||
username?: string
|
||||
name?: string
|
||||
surname?: string
|
||||
}
|
||||
|
||||
export interface IMyPage {
|
||||
_id?: string
|
||||
author_username?: string
|
||||
lang?: string
|
||||
title?: string
|
||||
icon?: string
|
||||
order?: number
|
||||
path?: string
|
||||
keywords?: string
|
||||
description?: string
|
||||
img1?: string
|
||||
content?: string
|
||||
video1?: string
|
||||
img2?: string
|
||||
content2?: string
|
||||
video2?: string
|
||||
img3?: string
|
||||
content3?: string
|
||||
video3?: string
|
||||
content4?: string
|
||||
active?: boolean
|
||||
inmenu?: boolean
|
||||
color?: string
|
||||
onlyif_logged?: boolean
|
||||
only_residenti?: boolean
|
||||
only_consiglio?: boolean
|
||||
submenu?: boolean
|
||||
l_par?: number,
|
||||
l_child?: number,
|
||||
infooter?: boolean
|
||||
internalpage?: boolean
|
||||
}
|
||||
|
||||
export interface ISites {
|
||||
_id?: string
|
||||
attiva?: boolean
|
||||
idapp?: string
|
||||
name?: string
|
||||
adminemail?: string
|
||||
manageremail?: string
|
||||
replyTo?: string
|
||||
host?: string
|
||||
portapp?: string
|
||||
dir?: string
|
||||
email_from?: string
|
||||
email_pwd?: string
|
||||
telegram_key?: string
|
||||
telegram_bot_name?: string
|
||||
pathreg_add?: string
|
||||
}
|
||||
|
||||
export interface INewsToSent {
|
||||
_id: string
|
||||
idapp?: string
|
||||
label?: string
|
||||
templemail_str?: string
|
||||
numemail_tot?: number
|
||||
numemail_sent?: number
|
||||
datetoSent?: Date
|
||||
datestartJob?: Date
|
||||
datefinishJob?: Date
|
||||
lastemailsent_Job?: Date
|
||||
starting_job?: boolean
|
||||
finish_job?: boolean
|
||||
error_job?: string
|
||||
}
|
||||
|
||||
export interface ICalZoom {
|
||||
lang?: string
|
||||
title?: string
|
||||
typeconf?: string
|
||||
date_start?: string
|
||||
date_end?: Date
|
||||
id_conf_zoom?: number
|
||||
note?: string
|
||||
}
|
||||
|
||||
export interface IGroup {
|
||||
_id?: any
|
||||
descr?: string
|
||||
}
|
||||
|
||||
export interface IMailinglist {
|
||||
name?: string
|
||||
surname?: string
|
||||
email: string
|
||||
lastid_newstosent?: string
|
||||
}
|
||||
|
||||
export interface IDiscipline {
|
||||
typol_code?: string
|
||||
order?: number
|
||||
label?: string
|
||||
description?: string
|
||||
linkpage?: string
|
||||
color?: string
|
||||
icon?: string
|
||||
img_small?: string
|
||||
showinhome?: boolean
|
||||
showinnewsletter?: boolean
|
||||
img?: string
|
||||
teachers?: ITeachUname[]
|
||||
}
|
||||
|
||||
export interface ITestp1 {
|
||||
contatore: number
|
||||
mioarray: ICfgServer[]
|
||||
}
|
||||
|
||||
export type StateConnection = 'online' | 'offline'
|
||||
|
||||
export interface IConfig {
|
||||
_id: string,
|
||||
key?: string,
|
||||
value: string
|
||||
}
|
||||
|
||||
export interface IMetaTags {
|
||||
title?: string
|
||||
keywords?: string
|
||||
description?: string
|
||||
}
|
||||
|
||||
export interface IGlobalState {
|
||||
finishLoading: boolean
|
||||
conta: number
|
||||
wasAlreadySubOnDb: boolean
|
||||
wasAlreadySubscribed: boolean
|
||||
isLoginPage: boolean
|
||||
layoutNeeded: boolean
|
||||
mobileMode: boolean
|
||||
menuCollapse: boolean
|
||||
leftDrawerOpen: boolean
|
||||
rightDrawerOpen: boolean
|
||||
rightCartOpen: boolean
|
||||
category: string
|
||||
stateConnection: string
|
||||
networkDataReceived: boolean
|
||||
clickcmd?: string
|
||||
cfgServer: ICfgServer[]
|
||||
testp1: ITestp1
|
||||
connData: IConnData
|
||||
posts: IPost[]
|
||||
menulinks: {}
|
||||
listatodo: IMenuList[]
|
||||
arrConfig: IConfig[]
|
||||
lastaction: IAction
|
||||
serv_settings: ISettings[],
|
||||
settings: ISettings[],
|
||||
disciplines: IDiscipline[],
|
||||
paymenttypes: IPaymentType[],
|
||||
newstosent: INewsToSent[],
|
||||
gallery: IGallery[],
|
||||
mypage: IMyPage[],
|
||||
templemail: ITemplEmail[],
|
||||
opzemail: ISettings[],
|
||||
mailinglist: IMailinglist[],
|
||||
calzoom: ICalZoom[],
|
||||
producers: IProducer[],
|
||||
storehouses: IStorehouse[],
|
||||
departments: IDepartment[],
|
||||
sharewithus: IShareWithUs[],
|
||||
groups: IGroup[],
|
||||
resps: IResp[],
|
||||
workers: IResp[],
|
||||
autoplaydisc: number
|
||||
TIMER: any
|
||||
TIMEOUT: any
|
||||
CUT: any
|
||||
TIMER_STATE: number
|
||||
URL_RITORNA: string
|
||||
URL_RESTORE: string
|
||||
}
|
||||
|
||||
export interface IMenuList {
|
||||
nametranslate: string
|
||||
description?: string
|
||||
idelem?: string
|
||||
icon?: string
|
||||
name?: string
|
||||
level_parent?: number
|
||||
level_child?: number
|
||||
urlroute?: string
|
||||
routes2?: IMenuList[]
|
||||
}
|
||||
|
||||
export interface IPathFile {
|
||||
path: string
|
||||
file: string
|
||||
}
|
||||
|
||||
export interface IListRoutes {
|
||||
active?: boolean
|
||||
order: number
|
||||
path: string
|
||||
name: string
|
||||
lang?: string
|
||||
materialIcon?: string
|
||||
component?: any
|
||||
reqauth?: boolean
|
||||
isseparator?: boolean
|
||||
inmenu?: boolean
|
||||
solotitle?: boolean
|
||||
infooter?: boolean
|
||||
submenu?: boolean
|
||||
onlyAdmin?: boolean
|
||||
onlyif_logged?: boolean
|
||||
onlyManager?: boolean
|
||||
onlySocioResidente?: boolean
|
||||
onlyConsiglio?: boolean
|
||||
onlyNotSoci?: boolean
|
||||
onlyDepartment?: boolean
|
||||
onlyTutor?: boolean
|
||||
color?: string
|
||||
onlyEditor?: boolean
|
||||
extraclass?: string
|
||||
meta?: any
|
||||
idelem?: string
|
||||
urlroute?: string
|
||||
img?: string
|
||||
// ------------------------
|
||||
faIcon?: string
|
||||
text?: string
|
||||
routes2?: IListRoutes[]
|
||||
level_parent?: number
|
||||
level_child?: number
|
||||
separator?: boolean
|
||||
}
|
||||
|
||||
export interface IOperators {
|
||||
username: string
|
||||
name: string
|
||||
surname: string
|
||||
email?: string
|
||||
qualification?: string
|
||||
disciplines?: string
|
||||
certifications?: string
|
||||
img?: string
|
||||
cell?: string
|
||||
usertelegram?: string
|
||||
paginaweb?: string
|
||||
paginafb?: string
|
||||
intro?: string
|
||||
info?: string
|
||||
vario?: string
|
||||
tab?: string
|
||||
}
|
||||
|
||||
export interface IPreloadImages {
|
||||
imgname: string
|
||||
alt: string
|
||||
mobile: boolean
|
||||
}
|
||||
|
||||
export interface ILang {
|
||||
label: string
|
||||
icon: string
|
||||
value: string
|
||||
image: string
|
||||
short: string
|
||||
}
|
||||
|
||||
export interface IAllLang {
|
||||
es?: string
|
||||
enUs?: string
|
||||
fr?: string
|
||||
de?: string
|
||||
it?: string
|
||||
}
|
||||
|
||||
export interface ITimeLineEntry {
|
||||
date: string
|
||||
title: string
|
||||
description: IAllLang
|
||||
description2?: IAllLang
|
||||
description3?: IAllLang
|
||||
icon: string
|
||||
image: string
|
||||
image2?: string
|
||||
image3?: string
|
||||
image4?: string
|
||||
video?: string
|
||||
side: string
|
||||
link_url?: string
|
||||
link_url_lang?: IAllLang
|
||||
link_text?: IAllLang
|
||||
ingallery?: boolean
|
||||
}
|
||||
|
||||
export interface ITimeLineMain {
|
||||
titlemain: IAllLang
|
||||
body: ITimeLineEntry[]
|
||||
}
|
||||
|
||||
export interface IImgGallery {
|
||||
_id?: string
|
||||
imagefile: string
|
||||
order?: number
|
||||
alt?: string
|
||||
description?: string
|
||||
}
|
||||
|
||||
export interface IGallery {
|
||||
_id?: string
|
||||
author_username?: string
|
||||
title?: string
|
||||
directory?: string
|
||||
list?: IImgGallery[]
|
||||
}
|
||||
|
||||
export interface IColl {
|
||||
title: IAllLang
|
||||
date?: string
|
||||
subtitle?: IAllLang
|
||||
img: string
|
||||
img2?: string
|
||||
linkagg?: string
|
||||
linkagg_type?: number
|
||||
width?: number
|
||||
height?: number
|
||||
ingallery?: boolean
|
||||
inexibitions?: boolean
|
||||
}
|
||||
|
||||
export interface ICollaborations {
|
||||
withwhom_title: IAllLang
|
||||
list: IColl[]
|
||||
}
|
||||
|
||||
export interface IParamDialog {
|
||||
param1?: any
|
||||
param2?: any
|
||||
param3?: any
|
||||
}
|
||||
|
||||
export interface IFunctionality {
|
||||
PWA?: boolean
|
||||
ENABLE_REGISTRATION?: boolean
|
||||
SHOW_REG_BUTTON?: boolean
|
||||
SHOW_PROFILE?: boolean
|
||||
SHOW_USER_MENU?: boolean
|
||||
SHOW_IF_IS_SERVER_CONNECTION?: boolean
|
||||
ENABLE_TODOS_LOADING?: boolean
|
||||
ENABLE_PROJECTS_LOADING?: boolean
|
||||
ENABLE_ECOMMERCE?: boolean
|
||||
SHOW_NEWSLETTER?: boolean
|
||||
SHOW_ONLY_POLICY?: boolean
|
||||
SHOW_MESSAGES?: boolean
|
||||
BOOKING_EVENTS?: boolean
|
||||
ENABLE_REG_AYNI?: boolean
|
||||
ENABLE_REG_SIP?: boolean
|
||||
ENABLE_REG_CNM?: boolean
|
||||
}
|
||||
|
||||
export interface IParamsQuery {
|
||||
table: string
|
||||
startRow: number
|
||||
endRow: number
|
||||
filter: string
|
||||
filterand: string
|
||||
sortBy: any
|
||||
descending: number
|
||||
userId: string
|
||||
codeId?: string
|
||||
lk_tab?: string,
|
||||
af_objId_tab?: string,
|
||||
lk_LF?: string,
|
||||
lk_FF?: string,
|
||||
lk_as?: string,
|
||||
lk_proj?: string,
|
||||
lk_col2?: string,
|
||||
}
|
||||
|
||||
export interface IColGridTable {
|
||||
name: string
|
||||
subfield?: string
|
||||
required?: boolean
|
||||
label?: string
|
||||
label_trans?: string
|
||||
align?: string
|
||||
field?: string
|
||||
sortable?: boolean
|
||||
disable?: boolean
|
||||
titlepopupedit?: string
|
||||
visible?: boolean
|
||||
icon?: string
|
||||
action?: any
|
||||
askaction?: string
|
||||
foredit?: boolean
|
||||
fieldtype?: number
|
||||
jointable?: string
|
||||
resultjoin?: string[]
|
||||
visuonlyEditVal?: boolean
|
||||
notShowInNewRec?: boolean
|
||||
}
|
||||
|
||||
export interface ITableRec {
|
||||
label: string
|
||||
value: string
|
||||
columns: IColGridTable[]
|
||||
colkey: string
|
||||
collabel: string
|
||||
colicon?: string
|
||||
onlyAdmin?: boolean
|
||||
noshow: boolean
|
||||
}
|
||||
|
||||
export interface IFilter {
|
||||
label: string
|
||||
value: string
|
||||
hide?: boolean
|
||||
default?: boolean
|
||||
}
|
||||
|
||||
export interface IDataPass {
|
||||
id: string
|
||||
table: string
|
||||
fieldsvalue: object
|
||||
}
|
||||
|
||||
export interface INewsState {
|
||||
lastnewstosent: INewsToSent | null
|
||||
nextnewstosent: INewsToSent | null
|
||||
totemail: number
|
||||
totsubscribed: number
|
||||
totunsubscribed: number
|
||||
totsentlastid: number
|
||||
}
|
||||
|
||||
export const DefaultNewsState: INewsState = {
|
||||
lastnewstosent: null,
|
||||
nextnewstosent: null,
|
||||
totemail: 0,
|
||||
totsubscribed: 0,
|
||||
totunsubscribed: 0,
|
||||
totsentlastid: 0,
|
||||
}
|
||||
|
||||
export interface IPagination {
|
||||
sortBy: string,
|
||||
descending: boolean
|
||||
rowsNumber: number
|
||||
page: number,
|
||||
rowsPerPage: number // specifying this determines pagination is server-side
|
||||
}
|
||||
81
src/model/MessageStore.ts
Executable file
81
src/model/MessageStore.ts
Executable file
@@ -0,0 +1,81 @@
|
||||
import { shared_consts } from '@src/common/shared_vuejs'
|
||||
import { EState } from './Calendar'
|
||||
|
||||
export interface IMessagePage {
|
||||
show: boolean
|
||||
msg: IMessage
|
||||
state: EState
|
||||
}
|
||||
|
||||
export interface ISource {
|
||||
page?: string
|
||||
event_id?: string
|
||||
infoevent?: string
|
||||
}
|
||||
|
||||
export interface IIdentity {
|
||||
idapp?: string
|
||||
username?: string
|
||||
}
|
||||
|
||||
export const enum StatusMessage {
|
||||
None = 0,
|
||||
WaitingToSend = 1,
|
||||
Sending = 2,
|
||||
Sent = 3,
|
||||
Received = 4,
|
||||
Readit = 5,
|
||||
}
|
||||
|
||||
export const MsgDefault: IMessage = {
|
||||
_id: '',
|
||||
idapp: '',
|
||||
source: {
|
||||
event_id: '',
|
||||
infoevent: '',
|
||||
page: '',
|
||||
},
|
||||
origin: {
|
||||
username: '',
|
||||
idapp: '',
|
||||
},
|
||||
dest: {
|
||||
idapp: '',
|
||||
username: '',
|
||||
},
|
||||
message: '',
|
||||
datemsg: new Date(),
|
||||
read: false,
|
||||
deleted: false,
|
||||
status: StatusMessage.None,
|
||||
}
|
||||
|
||||
export interface IMessage {
|
||||
_id?: any
|
||||
idapp?: string
|
||||
source?: ISource
|
||||
origin?: IIdentity
|
||||
dest?: IIdentity
|
||||
message: string
|
||||
datemsg?: Date
|
||||
read?: boolean
|
||||
deleted?: boolean
|
||||
status?: StatusMessage
|
||||
options?: number
|
||||
}
|
||||
|
||||
export interface IChat {
|
||||
username: string
|
||||
lasttimeActive?: Date
|
||||
}
|
||||
|
||||
export interface IMsgUsers {
|
||||
username: string
|
||||
msgs: IMessage[]
|
||||
lastdataread?: Date
|
||||
}
|
||||
|
||||
export interface IMessageState {
|
||||
last_msgs: IMessage[]
|
||||
users_msg: IMsgUsers[]
|
||||
}
|
||||
31
src/model/NotevoleStore.ts
Executable file
31
src/model/NotevoleStore.ts
Executable file
@@ -0,0 +1,31 @@
|
||||
import { IUserFields, IUserProfile } from '@src/model/UserStore'
|
||||
|
||||
export interface ICheckUser {
|
||||
verified_email?: boolean
|
||||
teleg_id?: number
|
||||
profile?: IUserProfile
|
||||
}
|
||||
|
||||
export interface INotData {
|
||||
num_reg?: number
|
||||
num_passeggeri?: number
|
||||
num_imbarcati?: number
|
||||
email_non_verif?: number
|
||||
num_teleg_attivo?: number
|
||||
num_teleg_pending?: number
|
||||
num_part_zoom?: number
|
||||
num_part_accepted?: number
|
||||
num_modalita_pagamento?: number
|
||||
arr_nations?: string
|
||||
lastsreg?: IUserFields[]
|
||||
checkuser?: ICheckUser | any
|
||||
numreg_untilday?: number
|
||||
reg_daily?: string
|
||||
imbarcati_daily?: string
|
||||
imbarcati_weekly?: string
|
||||
reg_weekly?: string
|
||||
}
|
||||
|
||||
export interface INotevoleState {
|
||||
datastat: INotData
|
||||
}
|
||||
131
src/model/Products.ts
Executable file
131
src/model/Products.ts
Executable file
@@ -0,0 +1,131 @@
|
||||
export interface IProduct {
|
||||
_id?: any
|
||||
active?: boolean
|
||||
idProducer?: string,
|
||||
idStorehouses?: string[],
|
||||
producer?: IProducer,
|
||||
storehouses?: IStorehouse[],
|
||||
code?: string,
|
||||
name?: string,
|
||||
description?: string,
|
||||
department?: string,
|
||||
category?: string,
|
||||
price?: number,
|
||||
after_price?: string,
|
||||
color?: string,
|
||||
size?: string,
|
||||
quantityAvailable?: number,
|
||||
canBeShipped?: boolean,
|
||||
canBeBuyOnline?: boolean,
|
||||
weight?: number,
|
||||
stars?: number,
|
||||
date?: Date,
|
||||
icon?: string,
|
||||
img?: string
|
||||
}
|
||||
|
||||
export interface IBaseOrder {
|
||||
order?: IOrder
|
||||
}
|
||||
|
||||
export interface IOrder {
|
||||
_id?: any
|
||||
idapp?: string
|
||||
userId?: string
|
||||
status?: number
|
||||
idProduct?: string
|
||||
idProducer?: string
|
||||
idStorehouse?: string
|
||||
price?: number
|
||||
after_price?: string
|
||||
color?: string
|
||||
size?: string
|
||||
quantity?: number
|
||||
weight?: number
|
||||
stars?: number
|
||||
product?: IProduct
|
||||
producer?: IProducer
|
||||
storehouse?: IStorehouse
|
||||
date_created?: Date
|
||||
date_checkout?: Date
|
||||
date_payment?: Date
|
||||
date_shipping?: Date
|
||||
date_delivered?: Date
|
||||
notes?: string
|
||||
}
|
||||
|
||||
export interface IProductsState {
|
||||
products: IProduct[]
|
||||
cart: ICart
|
||||
orders: IOrderCart[]
|
||||
}
|
||||
|
||||
export interface IProducer {
|
||||
_id?: any
|
||||
idapp?: string
|
||||
name?: string,
|
||||
description?: string,
|
||||
referent?: string,
|
||||
username?: string,
|
||||
region?: string,
|
||||
city?: string,
|
||||
img?: string,
|
||||
website?: string,
|
||||
}
|
||||
|
||||
export interface IDepartment {
|
||||
_id?: any
|
||||
idapp?: string
|
||||
name?: string,
|
||||
username?: string,
|
||||
}
|
||||
|
||||
export interface IStorehouse {
|
||||
_id?: any
|
||||
idapp?: string
|
||||
name?: string,
|
||||
description?: string,
|
||||
referent?: string,
|
||||
address?: string,
|
||||
city?: string,
|
||||
region?: string,
|
||||
img?: string,
|
||||
website?: string,
|
||||
}
|
||||
|
||||
export interface ICart {
|
||||
_id?: any
|
||||
idapp?: string
|
||||
userId?: string
|
||||
totalQty?: number
|
||||
totalPrice?: number
|
||||
department?: string
|
||||
items?: IBaseOrder[]
|
||||
note?: string
|
||||
modify_at?: Date
|
||||
}
|
||||
|
||||
export interface IOrderCart {
|
||||
_id?: any
|
||||
idapp?: string
|
||||
numorder?: number
|
||||
userId?: string
|
||||
totalQty?: number
|
||||
totalPrice?: number
|
||||
department?: string
|
||||
items?: IBaseOrder[]
|
||||
nameSurname?: string
|
||||
status?: number
|
||||
note?: string
|
||||
modify_at?: Date
|
||||
completed_at?: Date
|
||||
}
|
||||
|
||||
export interface IShareWithUs {
|
||||
_id?: any
|
||||
idapp?: string
|
||||
userId?: string
|
||||
description?: string
|
||||
numshared?: number
|
||||
rating?: number
|
||||
}
|
||||
78
src/model/Projects.ts
Executable file
78
src/model/Projects.ts
Executable file
@@ -0,0 +1,78 @@
|
||||
export interface IAction {
|
||||
table: string
|
||||
type: number
|
||||
_id: any
|
||||
cat?: string
|
||||
}
|
||||
|
||||
export interface IProject {
|
||||
_id?: any,
|
||||
userId?: string
|
||||
category?: string
|
||||
typeproj?: number
|
||||
id_main_project?: string
|
||||
id_parent?: string
|
||||
descr?: string
|
||||
note?: string
|
||||
longdescr?: string
|
||||
priority?: number
|
||||
statusproj?: number
|
||||
created_at?: Date
|
||||
modify_at?: Date
|
||||
completed_at?: Date
|
||||
expiring_at?: Date
|
||||
enableExpiring?: boolean
|
||||
modified?: boolean
|
||||
favourite?: number
|
||||
pos?: number
|
||||
order?: number
|
||||
live_url?: string
|
||||
test_url?: string
|
||||
hoursplanned?: number
|
||||
hoursleft?: number
|
||||
hoursworked?: number
|
||||
progressCalc?: number
|
||||
begin_development?: Date
|
||||
hoursweeky_plannedtowork?: number
|
||||
endwork_estimate?: Date
|
||||
begin_test?: Date
|
||||
totalphases?: number
|
||||
actualphase?: number
|
||||
privacyread?: string
|
||||
privacywrite?: string
|
||||
tipovisu?: number
|
||||
themecolor?: string
|
||||
themebgcolor?: string
|
||||
groupId?: string
|
||||
respUsername?: string
|
||||
viceRespUsername?: string
|
||||
vice2RespUsername?: string
|
||||
view?: string
|
||||
}
|
||||
|
||||
export interface IProjectsState {
|
||||
showtype: number
|
||||
projects: IProject[]
|
||||
insidePending: boolean
|
||||
visuLastCompleted: number
|
||||
}
|
||||
|
||||
export const Privacy = {
|
||||
all: 'all',
|
||||
friends: 'friends',
|
||||
mygroup: 'mygroup',
|
||||
onlyme: 'onlyme',
|
||||
inherited: 'inherited',
|
||||
}
|
||||
|
||||
export const TipoVisu = {
|
||||
inherited: 0,
|
||||
simplelist: 1,
|
||||
taskProgress: 2,
|
||||
responsabili: 3,
|
||||
}
|
||||
|
||||
export const TypeProj = {
|
||||
TYPE_PROJECT: 1,
|
||||
TYPE_SUBDIR: 2,
|
||||
}
|
||||
5
src/model/Test.ts
Executable file
5
src/model/Test.ts
Executable file
@@ -0,0 +1,5 @@
|
||||
export interface TestState {
|
||||
ready: boolean,
|
||||
mybool: boolean,
|
||||
mystring: string,
|
||||
}
|
||||
71
src/model/Todos.ts
Executable file
71
src/model/Todos.ts
Executable file
@@ -0,0 +1,71 @@
|
||||
import { IAction } from '@src/model/Projects'
|
||||
|
||||
export interface ITodo {
|
||||
_id?: any,
|
||||
userId?: string
|
||||
category?: string
|
||||
descr?: string,
|
||||
note?: string,
|
||||
priority?: number,
|
||||
statustodo?: number,
|
||||
created_at?: Date,
|
||||
modify_at?: Date,
|
||||
completed_at?: Date,
|
||||
expiring_at?: Date,
|
||||
enableExpiring?: boolean,
|
||||
modified?: boolean,
|
||||
pos?: number,
|
||||
order?: number,
|
||||
progress?: number
|
||||
progressCalc?: number
|
||||
phase?: number
|
||||
assigned_to_userId?: string
|
||||
hoursplanned?: number
|
||||
hoursworked?: number
|
||||
start_date?: Date
|
||||
themecolor?: string
|
||||
themebgcolor?: string
|
||||
assignedToUsers?: string[]
|
||||
}
|
||||
|
||||
export interface IParamTodo {
|
||||
categorySel?: string
|
||||
checkPending?: boolean
|
||||
id?: string
|
||||
objtodo?: ITodo
|
||||
atfirst?: boolean
|
||||
}
|
||||
|
||||
export interface IDrag {
|
||||
field?: string
|
||||
idelemtochange?: string
|
||||
prioritychosen?: number
|
||||
oldIndex?: number
|
||||
newIndex?: number
|
||||
category?: string
|
||||
id_proj?: string
|
||||
atfirst?: boolean
|
||||
tipoproj?: string
|
||||
}
|
||||
|
||||
export interface ITodosState {
|
||||
showtype: number
|
||||
todos: {}
|
||||
categories: string[]
|
||||
// todos_changed: number
|
||||
reload_fromServer: number
|
||||
testpao: string
|
||||
insidePending: boolean
|
||||
visuLastCompleted: number
|
||||
}
|
||||
|
||||
export interface IHours {
|
||||
_id?: any,
|
||||
userId?: string
|
||||
descr?: string,
|
||||
todoId?: string,
|
||||
date?: Date,
|
||||
time_start: number
|
||||
time_end: number
|
||||
hours: number
|
||||
}
|
||||
107
src/model/UserStore.ts
Executable file
107
src/model/UserStore.ts
Executable file
@@ -0,0 +1,107 @@
|
||||
import { IToken } from '@model/other'
|
||||
import { ICart, IOrderCart, IShareWithUs } from '@src/model/Products'
|
||||
|
||||
const enum ESexType {
|
||||
None = 0,
|
||||
Male = 1,
|
||||
Female = 2,
|
||||
}
|
||||
|
||||
export interface IUserProfile {
|
||||
img?: string
|
||||
nationality?: string
|
||||
intcode_cell?: string
|
||||
iso2_cell?: string
|
||||
cell?: string
|
||||
dateofbirth?: Date
|
||||
sex?: ESexType
|
||||
country_pay?: string
|
||||
email_paypal?: string
|
||||
payeer_id?: string
|
||||
advcash_id?: string
|
||||
revolut?: string
|
||||
link_payment?: string
|
||||
note_payment?: string
|
||||
username_telegram?: string
|
||||
teleg_id?: number
|
||||
teleg_checkcode?: number
|
||||
my_dream?: string
|
||||
paymenttypes?: IPaymentType[]
|
||||
manage_telegram?: boolean
|
||||
saw_zoom_presentation?: boolean
|
||||
ask_zoom_partecipato?: boolean
|
||||
saw_and_accepted?: boolean
|
||||
qualified?: boolean
|
||||
qualified_2invitati?: boolean
|
||||
myshares?: IShareWithUs[]
|
||||
socio?: boolean
|
||||
socioresidente?: boolean
|
||||
consiglio?: boolean
|
||||
}
|
||||
|
||||
export interface IPaymentType {
|
||||
key: string
|
||||
label: string
|
||||
}
|
||||
|
||||
export interface IUserFields {
|
||||
_id: string
|
||||
ind_order?: number
|
||||
email?: string
|
||||
username: string
|
||||
name: string
|
||||
surname: string
|
||||
password?: string
|
||||
ipaddr?: string
|
||||
perm?: number
|
||||
verified_email?: boolean
|
||||
aportador_solidario?: string
|
||||
|
||||
made_gift?: boolean
|
||||
tokens?: IToken[]
|
||||
lasttimeonline?: Date
|
||||
profile: IUserProfile
|
||||
qualified?: boolean
|
||||
numNaviEntrato?: number
|
||||
numinvitati?: number
|
||||
numinvitatiattivi?: number
|
||||
cart?: ICart
|
||||
ordercart?: IOrderCart
|
||||
}
|
||||
|
||||
/*
|
||||
password?: string
|
||||
lang
|
||||
*/
|
||||
|
||||
export interface IPerm {
|
||||
_id: number
|
||||
label: string
|
||||
}
|
||||
|
||||
export interface IUserState {
|
||||
my: IUserFields
|
||||
lang: string
|
||||
repeatPassword?: string
|
||||
|
||||
categorySel?: string
|
||||
|
||||
tokenforgot?: string
|
||||
|
||||
servercode?: number
|
||||
msg?: string
|
||||
resStatus?: number
|
||||
x_auth_token: string
|
||||
isLogged?: boolean
|
||||
isAdmin?: boolean
|
||||
isManager?: boolean
|
||||
isDepartment?: boolean
|
||||
isTutor?: boolean
|
||||
isZoomeri?: boolean
|
||||
isTratuttrici?: boolean
|
||||
isEditor?: boolean
|
||||
isTeacher?: boolean
|
||||
usersList?: IUserFields[]
|
||||
countusers?: number
|
||||
lastparamquery?: any
|
||||
}
|
||||
16
src/model/index.ts
Executable file
16
src/model/index.ts
Executable file
@@ -0,0 +1,16 @@
|
||||
export * from './UserStore'
|
||||
export * from './NotevoleStore'
|
||||
export * from './MessageStore'
|
||||
export * from './GlobalStore'
|
||||
export * from './signin-option'
|
||||
export * from './signup-option'
|
||||
export * from './key-value'
|
||||
// export * from './payload'
|
||||
|
||||
export * from './Categories'
|
||||
export * from './Todos'
|
||||
export * from './Projects'
|
||||
|
||||
export * from './Calendar'
|
||||
export * from './Estimate'
|
||||
export * from './Products'
|
||||
1
src/model/key-value.ts
Executable file
1
src/model/key-value.ts
Executable file
@@ -0,0 +1 @@
|
||||
export type KeyValue = { key: string, value: string };
|
||||
19
src/model/other.ts
Executable file
19
src/model/other.ts
Executable file
@@ -0,0 +1,19 @@
|
||||
export interface IToken {
|
||||
access: string
|
||||
// browser: string
|
||||
token: string
|
||||
data_login: Date
|
||||
}
|
||||
|
||||
export interface ILinkReg {
|
||||
idlink: string
|
||||
}
|
||||
|
||||
export interface IIdToken {
|
||||
x_auth_token: string
|
||||
}
|
||||
|
||||
export interface IResult {
|
||||
status: number
|
||||
statusText: string
|
||||
}
|
||||
29
src/model/session.ts
Executable file
29
src/model/session.ts
Executable file
@@ -0,0 +1,29 @@
|
||||
import { IUserState } from '@src/model/UserStore'
|
||||
|
||||
export interface SessionState {
|
||||
redirectUri: string | null,
|
||||
timestamp: number | null,
|
||||
token: string | null,
|
||||
user: IUserState | null,
|
||||
}
|
||||
|
||||
export interface CsrfCookie {
|
||||
message: string | null,
|
||||
}
|
||||
|
||||
export interface AuthUser {
|
||||
redirectUri?: string | null,
|
||||
token?: string | null,
|
||||
}
|
||||
|
||||
export interface LoginUser {
|
||||
email: string,
|
||||
password: string,
|
||||
'device_name': string,
|
||||
'remember_me': boolean,
|
||||
}
|
||||
|
||||
export interface AuthResponse {
|
||||
token: string | null,
|
||||
user: IUserState | null,
|
||||
}
|
||||
4
src/model/signin-option.ts
Executable file
4
src/model/signin-option.ts
Executable file
@@ -0,0 +1,4 @@
|
||||
export interface ISigninOptions {
|
||||
username: string
|
||||
password: string
|
||||
}
|
||||
51
src/model/signup-option.ts
Executable file
51
src/model/signup-option.ts
Executable file
@@ -0,0 +1,51 @@
|
||||
import { IUserProfile } from '@src/model/UserStore'
|
||||
|
||||
export interface ISignupOptions {
|
||||
email?: string
|
||||
username: string
|
||||
name?: string
|
||||
surname?: string
|
||||
password?: string
|
||||
lang?: string
|
||||
repeatPassword?: string
|
||||
terms?: boolean
|
||||
aportador_solidario?: string
|
||||
profile?: IUserProfile
|
||||
// already_registered: boolean
|
||||
}
|
||||
|
||||
export interface ISignupIscrizioneConacreisOptions {
|
||||
userId?: string
|
||||
name?: string
|
||||
surname?: string
|
||||
email?: string
|
||||
fiscalcode?: string
|
||||
residency_address?: string
|
||||
residency_city?: string
|
||||
residency_province?: string
|
||||
residency_country?: string
|
||||
residency_zipcode?: string
|
||||
dateofbirth?: Date
|
||||
dateofreg?: Date
|
||||
dateofapproved?: Date
|
||||
born_city?: string
|
||||
born_province?: string
|
||||
born_country?: string
|
||||
cell_phone?: string
|
||||
newsletter_on?: boolean
|
||||
accetta_carta_costituzionale_on?: boolean
|
||||
metodo_pagamento?: number
|
||||
iscrizione_compilata?: boolean
|
||||
ha_pagato?: boolean
|
||||
codiceConacreis?: string
|
||||
annoTesseramento?: number
|
||||
numTesseraInterna?: number
|
||||
motivazioni?: string
|
||||
competenze_professionalita?: string
|
||||
cosa_potrei_offrire?: string
|
||||
cosa_vorrei_ricevere?: string
|
||||
altre_comunicazioni?: string
|
||||
come_ci_hai_conosciuto?: string
|
||||
terms?: boolean
|
||||
note?: string
|
||||
}
|
||||
Reference in New Issue
Block a user