Skip to content
Snippets Groups Projects
Commit 63051fc0 authored by L4168's avatar L4168
Browse files

add icon column

parent 784e92e3
No related branches found
No related tags found
3 merge requests!59Development to master,!48Development,!46Small fixes to Development
......@@ -7,6 +7,7 @@ import { GeoDTO } from './geo.dto';
export class TrackingEntity {
@PrimaryGeneratedColumn('uuid') id: string;
@Column({ type: 'json', nullable: true }) data: GeoDTO[];
@Column('text') icon: string;
@ManyToOne(type => Game_PersonEntity, person => person.gamepersonId, {
onDelete: 'CASCADE',
......
......@@ -35,6 +35,7 @@ export class TrackingService {
trackdata['time'] = Date.now();
// initialize data
trackedperson = await this.trackingrepository.create(trackedperson);
trackedperson.icon = 'infantry.svg';
trackedperson.data = [trackdata];
trackedperson.faction = gameperson.faction;
trackedperson.game = gameId;
......@@ -68,6 +69,8 @@ export class TrackingService {
gamepersonId: player['gamepersonId']['gamepersonId'],
gamepersonRole: player['gamepersonId']['role'],
factionId: player['faction']['factionId'],
factionColour: player['faction']['colour'],
icon: player['icon'],
coordinates: player['data'].pop(),
};
}),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment