migration functions removed
This commit is contained in:
4
worklenz-frontend/package-lock.json
generated
4
worklenz-frontend/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "worklenz",
|
||||
"version": "1.4.16",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "worklenz",
|
||||
"version": "1.4.16",
|
||||
"version": "1.0.0",
|
||||
"dependencies": {
|
||||
"@angular/animations": "^16.2.0",
|
||||
"@angular/cdk": "^16.2.0",
|
||||
|
||||
@@ -3,18 +3,8 @@ import {RouterModule, Routes} from '@angular/router';
|
||||
import {ProjectsComponent} from './projects/projects.component';
|
||||
import {ProjectOverviewComponent} from './project-insights/project-overview/project-overview.component';
|
||||
import {ProjectViewComponent} from "./project-view/project-view.component";
|
||||
import {MigrateTemplatesComponent} from "./projects/migrate-templates/migrate-templates.component";
|
||||
import {
|
||||
MigrateMemberAllocationsComponent
|
||||
} from "./projects/migrate-member-allocations/migrate-member-allocations.component";
|
||||
import {MigrateProjectPhasesComponent} from "./projects/migrate-project-phases/migrate-project-phases.component";
|
||||
import {MigratePhaseSortOrderComponent} from "./projects/migrate-phase-sort-order/migrate-phase-sort-order.component";
|
||||
|
||||
const routes: Routes = [
|
||||
{path: 'migrate', component: MigrateTemplatesComponent},
|
||||
{path: 'migrate/member-allocations', component: MigrateMemberAllocationsComponent},
|
||||
{path: 'migrate/project-phases', component: MigrateProjectPhasesComponent},
|
||||
{path: 'migrate/phase-sort-order', component: MigratePhaseSortOrderComponent},
|
||||
{path: '', component: ProjectsComponent},
|
||||
{path: 'member/:id', component: ProjectOverviewComponent},
|
||||
{path: ':id', component: ProjectViewComponent},
|
||||
|
||||
@@ -105,7 +105,6 @@ import {
|
||||
import {
|
||||
ProjectTemplateImportDrawerComponent
|
||||
} from "@admin/components/project-template-import-drawer/project-template-import-drawer.component";
|
||||
import { MigrateTemplatesComponent } from './projects/migrate-templates/migrate-templates.component';
|
||||
import {WorkloadGaantChartV2Component} from './components-v2/workload-gaant-chart-v2/workload-gaant-chart-v2.component';
|
||||
import {TaskNameComponent} from './components-v2/workload-gaant-chart-v2/components/task-name/task-name.component';
|
||||
import {WLStartDateComponent} from './components-v2/workload-gaant-chart-v2/components/start-date/start-date.component';
|
||||
@@ -131,10 +130,6 @@ import { MemberTaskAddContainerComponent } from './components-v2/workload-gaant-
|
||||
import { TaskListHeaderComponent } from './components-v2/workload-gaant-chart-v2/components/task-list-header/task-list-header.component';
|
||||
import { WLContextMenuComponent } from './components-v2/workload-gaant-chart-v2/components/context-menu/context-menu.component';
|
||||
import {GanttChartV2Module} from "../modules/roadmap-v2/gantt-chart-v2.module";
|
||||
import { MigrateMemberAllocationsComponent } from './projects/migrate-member-allocations/migrate-member-allocations.component';
|
||||
import { MigrateProjectPhasesComponent } from './projects/migrate-project-phases/migrate-project-phases.component';
|
||||
import { MigratePhaseSortOrderComponent } from './projects/migrate-phase-sort-order/migrate-phase-sort-order.component';
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
@@ -171,11 +166,7 @@ import { MigratePhaseSortOrderComponent } from './projects/migrate-phase-sort-or
|
||||
OverviewTabComponent,
|
||||
MemberTaskAddContainerComponent,
|
||||
TaskListHeaderComponent,
|
||||
WLContextMenuComponent,
|
||||
MigrateTemplatesComponent,
|
||||
MigrateMemberAllocationsComponent,
|
||||
MigrateProjectPhasesComponent,
|
||||
MigratePhaseSortOrderComponent
|
||||
WLContextMenuComponent
|
||||
],
|
||||
imports: [
|
||||
CommonModule,
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { MigrateMemberAllocationsComponent } from './migrate-member-allocations.component';
|
||||
|
||||
describe('MigrateMemberAllocationsComponent', () => {
|
||||
let component: MigrateMemberAllocationsComponent;
|
||||
let fixture: ComponentFixture<MigrateMemberAllocationsComponent>;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [MigrateMemberAllocationsComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(MigrateMemberAllocationsComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -1,21 +0,0 @@
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {ScheduleApiService} from "@api/schedule-api.service";
|
||||
|
||||
@Component({
|
||||
selector: 'worklenz-migrate-member-allocations',
|
||||
templateUrl: './migrate-member-allocations.component.html',
|
||||
styleUrls: ['./migrate-member-allocations.component.scss']
|
||||
})
|
||||
export class MigrateMemberAllocationsComponent implements OnInit{
|
||||
constructor(
|
||||
private readonly api: ScheduleApiService
|
||||
) {}
|
||||
|
||||
async ngOnInit() {
|
||||
const res = await this.api.migrateAllocations();
|
||||
if(res.done) {
|
||||
alert("Drop migrate_member_allocations postgres function.")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
<p>migrate-phase-sort-order works!</p>
|
||||
@@ -1,21 +0,0 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { MigratePhaseSortOrderComponent } from './migrate-phase-sort-order.component';
|
||||
|
||||
describe('MigratePhaseSortOrderComponent', () => {
|
||||
let component: MigratePhaseSortOrderComponent;
|
||||
let fixture: ComponentFixture<MigratePhaseSortOrderComponent>;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [MigratePhaseSortOrderComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(MigratePhaseSortOrderComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -1,19 +0,0 @@
|
||||
import { Component } from '@angular/core';
|
||||
import {ProjectsApiService} from "@api/projects-api.service";
|
||||
|
||||
@Component({
|
||||
selector: 'worklenz-migrate-phase-sort-order',
|
||||
templateUrl: './migrate-phase-sort-order.component.html',
|
||||
styleUrls: ['./migrate-phase-sort-order.component.scss']
|
||||
})
|
||||
export class MigratePhaseSortOrderComponent {
|
||||
constructor(
|
||||
private api: ProjectsApiService,
|
||||
) {}
|
||||
|
||||
async ngOnInit() {
|
||||
setTimeout(async () => {
|
||||
await this.api.updateExistSortOrder();
|
||||
},500);
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
<p>migrate-project-phases works!</p>
|
||||
@@ -1,21 +0,0 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { MigrateProjectPhasesComponent } from './migrate-project-phases.component';
|
||||
|
||||
describe('MigrateProjectPhasesComponent', () => {
|
||||
let component: MigrateProjectPhasesComponent;
|
||||
let fixture: ComponentFixture<MigrateProjectPhasesComponent>;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [MigrateProjectPhasesComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(MigrateProjectPhasesComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -1,21 +0,0 @@
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {ReportingApiService} from "../../../reporting/reporting-api.service";
|
||||
import {ProjectsApiService} from "@api/projects-api.service";
|
||||
|
||||
@Component({
|
||||
selector: 'worklenz-migrate-project-phases',
|
||||
templateUrl: './migrate-project-phases.component.html',
|
||||
styleUrls: ['./migrate-project-phases.component.scss']
|
||||
})
|
||||
export class MigrateProjectPhasesComponent implements OnInit{
|
||||
constructor(
|
||||
private api: ProjectsApiService,
|
||||
) {}
|
||||
|
||||
async ngOnInit() {
|
||||
setTimeout(async () => {
|
||||
await this.api.updateExistPhaseColors();
|
||||
},500);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
<p>migrate-templates works!</p>
|
||||
@@ -1,21 +0,0 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { MigrateTemplatesComponent } from './migrate-templates.component';
|
||||
|
||||
describe('MigrateTemplatesComponent', () => {
|
||||
let component: MigrateTemplatesComponent;
|
||||
let fixture: ComponentFixture<MigrateTemplatesComponent>;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [MigrateTemplatesComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(MigrateTemplatesComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -1,19 +0,0 @@
|
||||
import {Component} from '@angular/core';
|
||||
import {ProjectTemplateApiService} from "@api/project-template-api.service";
|
||||
|
||||
@Component({
|
||||
selector: 'worklenz-migrate-templates',
|
||||
templateUrl: './migrate-templates.component.html',
|
||||
styleUrls: ['./migrate-templates.component.scss']
|
||||
})
|
||||
export class MigrateTemplatesComponent {
|
||||
constructor(
|
||||
private readonly api: ProjectTemplateApiService
|
||||
) {
|
||||
this.import();
|
||||
}
|
||||
|
||||
async import() {
|
||||
await this.api.createTemplates();
|
||||
}
|
||||
}
|
||||
@@ -123,12 +123,4 @@ export class ProjectsApiService extends APIServiceBase {
|
||||
return this._get(this.http, `${this.root}/archive-all/${id}`);
|
||||
}
|
||||
|
||||
public async updateExistPhaseColors(): Promise<IServerResponse<any>> {
|
||||
return this._get(this.http, `${this.root}/update-exist-phase-colors`);
|
||||
}
|
||||
|
||||
public async updateExistSortOrder(): Promise<IServerResponse<any>> {
|
||||
return this._get(this.http, `${this.root}/update-exist-sort-order`);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -51,9 +51,4 @@ export class ScheduleApiService extends APIServiceBase {
|
||||
return this._get(this.http, `${this.root}/tasks-by-member/${config.id}${q}`);
|
||||
}
|
||||
|
||||
// This function only calls a single time.
|
||||
migrateAllocations(): Promise<IServerResponse<any>> {
|
||||
return this._get(this.http, `${this.root}/migrate/member-allocations`)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user