Skip to content

Commit

Permalink
merged with production
Browse files Browse the repository at this point in the history
  • Loading branch information
oyurekten committed Nov 18, 2023
1 parent b31bbe8 commit e255d23
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 26 deletions.
26 changes: 13 additions & 13 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@
}
]
},
"development": {
"master": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.dev.ts"
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
Expand All @@ -76,11 +76,11 @@
}
]
},
"local": {
"development": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.local.ts"
"with": "src/environments/environment.dev.ts"
}
],
"optimization": true,
Expand All @@ -100,11 +100,11 @@
}
]
},
"test": {
"local": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.test.ts"
"with": "src/environments/environment.local.ts"
}
],
"optimization": true,
Expand All @@ -124,11 +124,11 @@
}
]
},
"staging": {
"test": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.staging.ts"
"with": "src/environments/environment.test.ts"
}
],
"optimization": true,
Expand All @@ -148,11 +148,11 @@
}
]
},
"kubernetes": {
"staging": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.kubernetes.ts"
"with": "src/environments/environment.staging.ts"
}
],
"optimization": true,
Expand Down Expand Up @@ -186,14 +186,14 @@
"development": {
"browserTarget": "metabolights-editor:build:development"
},
"kubernetes": {
"browserTarget": "metabolights-editor:build:kubernetes"
},
"staging": {
"browserTarget": "metabolights-editor:build:staging"
},
"test": {
"browserTarget": "metabolights-editor:build:test"
},
"master": {
"browserTarget": "metabolights-editor:build:production"
}
}
},
Expand Down
36 changes: 24 additions & 12 deletions src/app/components/study/status/status.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,20 +110,32 @@ export class StatusComponent implements OnInit {
ngOnInit() {}

openModal() {
if (!this.curator && this.status && this.status.toLowerCase() === "submitted") {
if (this.validation.status === 'error' || this.validation.status === 'not ready') {
toastr.error("Please validate your study and fix all errors before changing status.", "Error", {
timeOut: "5000",
positionClass: "toast-top-center",
preventDuplicates: true,
extendedTimeOut: 0,
tapToDismiss: false,
});
}
return;
if (this.curator){
this.isModalOpen = true;
} else {
if (this.status != null && this.status.toLowerCase() === "submitted") {
if (this.validation.status === 'error' || this.validation.status === 'not ready') {
toastr.error("Please validate your study and fix all errors before changing status.", "Error", {
timeOut: "5000",
positionClass: "toast-top-center",
preventDuplicates: true,
extendedTimeOut: 0,
tapToDismiss: false,
});
} else {
this.isModalOpen = true;
}
} else {
toastr.error("You can not update your study status.", "Error", {
timeOut: "5000",
positionClass: "toast-top-center",
preventDuplicates: true,
extendedTimeOut: 0,
tapToDismiss: false,
});
}
this.isModalOpen = true;
}
}

closeModal() {
this.isModalOpen = false;
Expand Down
2 changes: 1 addition & 1 deletion src/environments/environment.kubernetes.ts → src/environments/environment.master.ts
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const environment = {
production: true,
context: "kubernetes",
context: "production",
isTesting: false,
contextPath: "/metabolights/editor",
};

0 comments on commit e255d23

Please sign in to comment.