mirror of https://github.com/ghostfolio/ghostfolio
committed by
GitHub
83 changed files with 28216 additions and 13782 deletions
@ -1,5 +1,6 @@ |
|||||
export interface GetValueObject { |
import { UniqueAsset } from '@ghostfolio/common/interfaces'; |
||||
|
|
||||
|
export interface GetValueObject extends UniqueAsset { |
||||
date: Date; |
date: Date; |
||||
marketPriceInBaseCurrency: number; |
marketPriceInBaseCurrency: number; |
||||
symbol: string; |
|
||||
} |
} |
||||
|
@ -0,0 +1,11 @@ |
|||||
|
import { PrismaModule } from '@ghostfolio/api/services/prisma/prisma.module'; |
||||
|
import { Module } from '@nestjs/common'; |
||||
|
|
||||
|
import { SymbolProfileOverwriteService } from './symbol-profile-overwrite.service'; |
||||
|
|
||||
|
@Module({ |
||||
|
imports: [PrismaModule], |
||||
|
providers: [SymbolProfileOverwriteService], |
||||
|
exports: [SymbolProfileOverwriteService] |
||||
|
}) |
||||
|
export class SymbolProfileOverwriteModule {} |
@ -0,0 +1,68 @@ |
|||||
|
import { PrismaService } from '@ghostfolio/api/services/prisma/prisma.service'; |
||||
|
import { Injectable } from '@nestjs/common'; |
||||
|
import { DataSource, Prisma, SymbolProfileOverrides } from '@prisma/client'; |
||||
|
|
||||
|
@Injectable() |
||||
|
export class SymbolProfileOverwriteService { |
||||
|
public constructor(private readonly prismaService: PrismaService) {} |
||||
|
|
||||
|
public async add( |
||||
|
assetProfileOverwrite: Prisma.SymbolProfileOverridesCreateInput |
||||
|
): Promise<SymbolProfileOverrides | never> { |
||||
|
return this.prismaService.symbolProfileOverrides.create({ |
||||
|
data: assetProfileOverwrite |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public async delete(symbolProfileId: string) { |
||||
|
return this.prismaService.symbolProfileOverrides.delete({ |
||||
|
where: { symbolProfileId: symbolProfileId } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public updateSymbolProfileOverrides({ |
||||
|
assetClass, |
||||
|
assetSubClass, |
||||
|
name, |
||||
|
countries, |
||||
|
sectors, |
||||
|
url, |
||||
|
symbolProfileId |
||||
|
}: Prisma.SymbolProfileOverridesUpdateInput & { symbolProfileId: string }) { |
||||
|
return this.prismaService.symbolProfileOverrides.update({ |
||||
|
data: { |
||||
|
assetClass, |
||||
|
assetSubClass, |
||||
|
name, |
||||
|
countries, |
||||
|
sectors, |
||||
|
url |
||||
|
}, |
||||
|
where: { symbolProfileId: symbolProfileId } |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public async GetSymbolProfileId( |
||||
|
Symbol: string, |
||||
|
datasource: DataSource |
||||
|
): Promise<string> { |
||||
|
let SymbolProfileId = await this.prismaService.symbolProfile |
||||
|
.findFirst({ |
||||
|
where: { |
||||
|
symbol: Symbol, |
||||
|
dataSource: datasource |
||||
|
} |
||||
|
}) |
||||
|
.then((s) => s.id); |
||||
|
|
||||
|
let symbolProfileIdSaved = await this.prismaService.symbolProfileOverrides |
||||
|
.findFirst({ |
||||
|
where: { |
||||
|
symbolProfileId: SymbolProfileId |
||||
|
} |
||||
|
}) |
||||
|
.then((s) => s?.symbolProfileId); |
||||
|
|
||||
|
return symbolProfileIdSaved; |
||||
|
} |
||||
|
} |
@ -0,0 +1,31 @@ |
|||||
|
import { CommonModule } from '@angular/common'; |
||||
|
import { Component } from '@angular/core'; |
||||
|
import { MatButtonModule } from '@angular/material/button'; |
||||
|
import { RouterModule } from '@angular/router'; |
||||
|
|
||||
|
import { products } from '../products'; |
||||
|
|
||||
|
@Component({ |
||||
|
host: { class: 'page' }, |
||||
|
imports: [CommonModule, MatButtonModule, RouterModule], |
||||
|
selector: 'gf-allvue-systems-page', |
||||
|
standalone: true, |
||||
|
styleUrls: ['../product-page-template.scss'], |
||||
|
templateUrl: '../product-page-template.html' |
||||
|
}) |
||||
|
export class AllvueSystemsPageComponent { |
||||
|
public product1 = products.find(({ key }) => { |
||||
|
return key === 'ghostfolio'; |
||||
|
}); |
||||
|
|
||||
|
public product2 = products.find(({ key }) => { |
||||
|
return key === 'allvue-systems'; |
||||
|
}); |
||||
|
|
||||
|
public routerLinkAbout = ['/' + $localize`about`]; |
||||
|
public routerLinkFeatures = ['/' + $localize`features`]; |
||||
|
public routerLinkResourcesPersonalFinanceTools = [ |
||||
|
'/' + $localize`resources`, |
||||
|
'personal-finance-tools' |
||||
|
]; |
||||
|
} |
@ -0,0 +1,31 @@ |
|||||
|
import { CommonModule } from '@angular/common'; |
||||
|
import { Component } from '@angular/core'; |
||||
|
import { MatButtonModule } from '@angular/material/button'; |
||||
|
import { RouterModule } from '@angular/router'; |
||||
|
|
||||
|
import { products } from '../products'; |
||||
|
|
||||
|
@Component({ |
||||
|
host: { class: 'page' }, |
||||
|
imports: [CommonModule, MatButtonModule, RouterModule], |
||||
|
selector: 'gf-basil-finance-page', |
||||
|
standalone: true, |
||||
|
styleUrls: ['../product-page-template.scss'], |
||||
|
templateUrl: '../product-page-template.html' |
||||
|
}) |
||||
|
export class BasilFinancePageComponent { |
||||
|
public product1 = products.find(({ key }) => { |
||||
|
return key === 'ghostfolio'; |
||||
|
}); |
||||
|
|
||||
|
public product2 = products.find(({ key }) => { |
||||
|
return key === 'basil-finance'; |
||||
|
}); |
||||
|
|
||||
|
public routerLinkAbout = ['/' + $localize`about`]; |
||||
|
public routerLinkFeatures = ['/' + $localize`features`]; |
||||
|
public routerLinkResourcesPersonalFinanceTools = [ |
||||
|
'/' + $localize`resources`, |
||||
|
'personal-finance-tools' |
||||
|
]; |
||||
|
} |
@ -0,0 +1,31 @@ |
|||||
|
import { CommonModule } from '@angular/common'; |
||||
|
import { Component } from '@angular/core'; |
||||
|
import { MatButtonModule } from '@angular/material/button'; |
||||
|
import { RouterModule } from '@angular/router'; |
||||
|
|
||||
|
import { products } from '../products'; |
||||
|
|
||||
|
@Component({ |
||||
|
host: { class: 'page' }, |
||||
|
imports: [CommonModule, MatButtonModule, RouterModule], |
||||
|
selector: 'gf-magnifi-page', |
||||
|
standalone: true, |
||||
|
styleUrls: ['../product-page-template.scss'], |
||||
|
templateUrl: '../product-page-template.html' |
||||
|
}) |
||||
|
export class MagnifiPageComponent { |
||||
|
public product1 = products.find(({ key }) => { |
||||
|
return key === 'ghostfolio'; |
||||
|
}); |
||||
|
|
||||
|
public product2 = products.find(({ key }) => { |
||||
|
return key === 'magnifi'; |
||||
|
}); |
||||
|
|
||||
|
public routerLinkAbout = ['/' + $localize`about`]; |
||||
|
public routerLinkFeatures = ['/' + $localize`features`]; |
||||
|
public routerLinkResourcesPersonalFinanceTools = [ |
||||
|
'/' + $localize`resources`, |
||||
|
'personal-finance-tools' |
||||
|
]; |
||||
|
} |
@ -0,0 +1,31 @@ |
|||||
|
import { CommonModule } from '@angular/common'; |
||||
|
import { Component } from '@angular/core'; |
||||
|
import { MatButtonModule } from '@angular/material/button'; |
||||
|
import { RouterModule } from '@angular/router'; |
||||
|
|
||||
|
import { products } from '../products'; |
||||
|
|
||||
|
@Component({ |
||||
|
host: { class: 'page' }, |
||||
|
imports: [CommonModule, MatButtonModule, RouterModule], |
||||
|
selector: 'gf-monarch-money-page', |
||||
|
standalone: true, |
||||
|
styleUrls: ['../product-page-template.scss'], |
||||
|
templateUrl: '../product-page-template.html' |
||||
|
}) |
||||
|
export class MonarchMoneyPageComponent { |
||||
|
public product1 = products.find(({ key }) => { |
||||
|
return key === 'ghostfolio'; |
||||
|
}); |
||||
|
|
||||
|
public product2 = products.find(({ key }) => { |
||||
|
return key === 'monarch-money'; |
||||
|
}); |
||||
|
|
||||
|
public routerLinkAbout = ['/' + $localize`about`]; |
||||
|
public routerLinkFeatures = ['/' + $localize`features`]; |
||||
|
public routerLinkResourcesPersonalFinanceTools = [ |
||||
|
'/' + $localize`resources`, |
||||
|
'personal-finance-tools' |
||||
|
]; |
||||
|
} |
@ -0,0 +1,31 @@ |
|||||
|
import { CommonModule } from '@angular/common'; |
||||
|
import { Component } from '@angular/core'; |
||||
|
import { MatButtonModule } from '@angular/material/button'; |
||||
|
import { RouterModule } from '@angular/router'; |
||||
|
|
||||
|
import { products } from '../products'; |
||||
|
|
||||
|
@Component({ |
||||
|
host: { class: 'page' }, |
||||
|
imports: [CommonModule, MatButtonModule, RouterModule], |
||||
|
selector: 'gf-ynab-page', |
||||
|
standalone: true, |
||||
|
styleUrls: ['../product-page-template.scss'], |
||||
|
templateUrl: '../product-page-template.html' |
||||
|
}) |
||||
|
export class YnabPageComponent { |
||||
|
public product1 = products.find(({ key }) => { |
||||
|
return key === 'ghostfolio'; |
||||
|
}); |
||||
|
|
||||
|
public product2 = products.find(({ key }) => { |
||||
|
return key === 'ynab'; |
||||
|
}); |
||||
|
|
||||
|
public routerLinkAbout = ['/' + $localize`about`]; |
||||
|
public routerLinkFeatures = ['/' + $localize`features`]; |
||||
|
public routerLinkResourcesPersonalFinanceTools = [ |
||||
|
'/' + $localize`resources`, |
||||
|
'personal-finance-tools' |
||||
|
]; |
||||
|
} |
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -0,0 +1,7 @@ |
|||||
|
import { SubscriptionType } from '@ghostfolio/common/types/subscription-type.type'; |
||||
|
|
||||
|
export interface SystemMessage { |
||||
|
message: string; |
||||
|
routerLink?: string[]; |
||||
|
targetGroups: SubscriptionType[]; |
||||
|
} |
@ -0,0 +1,2 @@ |
|||||
|
-- AlterTable |
||||
|
ALTER TABLE "Account" DROP COLUMN "accountType"; |
Loading…
Reference in new issue