integracija sa backendom - in progress

parent e6e77f54
...@@ -30,6 +30,7 @@ import {ChipsModule} from 'primeng/chips'; ...@@ -30,6 +30,7 @@ import {ChipsModule} from 'primeng/chips';
import {MessagesModule} from 'primeng/messages'; import {MessagesModule} from 'primeng/messages';
import {MessageModule} from 'primeng/message'; import {MessageModule} from 'primeng/message';
import {ToastModule} from 'primeng/toast'; import {ToastModule} from 'primeng/toast';
import {PanelModule} from "primeng/panel";
@NgModule({ @NgModule({
...@@ -39,38 +40,39 @@ import {ToastModule} from 'primeng/toast'; ...@@ -39,38 +40,39 @@ import {ToastModule} from 'primeng/toast';
ResourceComponent, ResourceComponent,
AddResourceComponent AddResourceComponent
], ],
imports: [ imports: [
BrowserModule, BrowserModule,
BrowserAnimationsModule, BrowserAnimationsModule,
AppRoutingModule, AppRoutingModule,
MenubarModule, MenubarModule,
ButtonModule, ButtonModule,
MenuModule, MenuModule,
AccordionModule, AccordionModule,
SharedModule, SharedModule,
CheckboxModule, CheckboxModule,
FormsModule, FormsModule,
DataViewModule, DataViewModule,
RatingModule, RatingModule,
RouterModule, RouterModule,
HttpClientModule, HttpClientModule,
MultiSelectModule, MultiSelectModule,
DropdownModule, DropdownModule,
InputTextModule, InputTextModule,
TooltipModule, TooltipModule,
CardModule, CardModule,
TagModule, TagModule,
InputTextModule, InputTextModule,
CheckboxModule, CheckboxModule,
ButtonModule, ButtonModule,
RadioButtonModule, RadioButtonModule,
InputTextareaModule, InputTextareaModule,
FileUploadModule, FileUploadModule,
ChipsModule, ChipsModule,
MessagesModule, MessagesModule,
MessageModule, MessageModule,
ToastModule ToastModule,
], PanelModule
],
providers: [MessageService], providers: [MessageService],
bootstrap: [AppComponent] bootstrap: [AppComponent]
}) })
......
...@@ -26,9 +26,27 @@ ...@@ -26,9 +26,27 @@
</div> </div>
</div> </div>
<div class="p-field p-grid"> <div class="p-field p-grid">
<label class="p-col-12 p-mb-2 p-md-2 p-mb-md-0">Content type</label> <label class="p-col-12 p-mb-2 p-md-2 p-mb-md-0">Relaevant pests</label>
<div class="p-col-12 p-md-10"> <div class="p-col-12 p-md-10">
<p-dropdown [options]="resourceTypes" optionLabel="name" placeholder="Select content type" [(ngModel)]="resource.resourceType"></p-dropdown> <p-multiSelect defaultLabel="Select pests" [options]="pests" optionLabel="name" [(ngModel)]="resource.pests"></p-multiSelect>
</div>
</div>
<div class="p-field p-grid">
<label class="p-col-12 p-mb-2 p-md-2 p-mb-md-0">Relevant crops</label>
<div class="p-col-12 p-md-10">
<p-multiSelect defaultLabel="Select crops" [options]="crops" optionLabel="name" [(ngModel)]="resource.crops"></p-multiSelect>
</div>
</div>
<div class="p-field p-grid">
<label class="p-col-12 p-mb-2 p-md-2 p-mb-md-0">Relevant project</label>
<div class="p-col-12 p-md-10">
<p-dropdown [options]="projects" optionLabel="name" placeholder="Select project" [(ngModel)]="resource.project"></p-dropdown>
</div>
</div>
<div class="p-field p-grid">
<label class="p-col-12 p-mb-2 p-md-2 p-mb-md-0">Resource type</label>
<div class="p-col-12 p-md-10">
<p-dropdown [options]="resourceTypes" optionLabel="name" placeholder="Select resource type" [(ngModel)]="resource.resourceType"></p-dropdown>
</div> </div>
</div> </div>
<div class="p-field p-grid"> <div class="p-field p-grid">
...@@ -57,12 +75,6 @@ ...@@ -57,12 +75,6 @@
</div> </div>
</div> </div>
<div class="p-field p-grid"> <div class="p-field p-grid">
<label class="p-col-12 p-mb-2 p-md-2 p-mb-md-0">Project</label>
<div class="p-col-12 p-md-10">
<p-dropdown [options]="projects" optionLabel="name" placeholder="Select project" [(ngModel)]="resource.project"></p-dropdown>
</div>
</div>
<div class="p-field p-grid">
<label class="p-col-12 p-mb-2 p-md-2 p-mb-md-0">Links</label> <label class="p-col-12 p-mb-2 p-md-2 p-mb-md-0">Links</label>
<div class="p-col-12 p-md-10"> <div class="p-col-12 p-md-10">
<p-chips [(ngModel)]="resource.links" [max]=5 placeholder="Enter relevant links" [allowDuplicate]=false></p-chips> <p-chips [(ngModel)]="resource.links" [max]=5 placeholder="Enter relevant links" [allowDuplicate]=false></p-chips>
...@@ -74,18 +86,24 @@ ...@@ -74,18 +86,24 @@
<input id="source" type="text" pInputText [(ngModel)]="resource.resourceOrigin"> <input id="source" type="text" pInputText [(ngModel)]="resource.resourceOrigin">
</div> </div>
</div> </div>
<div class="p-field p-grid"> <div class="p-field p-grid">
<label for="contactName" class="p-col-12 p-mb-2 p-md-2 p-mb-md-0">Contact name</label> <label for="citation" class="p-col-12 p-mb-2 p-md-2 p-mb-md-0">Citation</label>
<div class="p-col-12 p-md-10"> <div class="p-col-12 p-md-10">
<input id="contactName" type="text" pInputText [(ngModel)]="resource.contactName"> <input id="citation" type="text" pInputText [(ngModel)]="resource.citation">
</div>
</div> </div>
</div>
<div class="p-field p-grid"> <div class="p-field p-grid">
<label for="contactOrg" class="p-col-12 p-mb-2 p-md-2 p-mb-md-0">Contact institution</label> <label for="contactOrg" class="p-col-12 p-mb-2 p-md-2 p-mb-md-0">Contact institution</label>
<div class="p-col-12 p-md-10"> <div class="p-col-12 p-md-10">
<input id="contactOrg" type="text" pInputText [(ngModel)]="resource.contactInstitution"> <input id="contactOrg" type="text" pInputText [(ngModel)]="resource.contactInstitution">
</div> </div>
</div> </div>
<div class="p-field p-grid">
<label for="contactName" class="p-col-12 p-mb-2 p-md-2 p-mb-md-0">Contact name</label>
<div class="p-col-12 p-md-10">
<input id="contactName" type="text" pInputText [(ngModel)]="resource.contactName">
</div>
</div>
<div class="p-field p-grid"> <div class="p-field p-grid">
<label for="contactEmail" class="p-col-12 p-mb-2 p-md-2 p-mb-md-0">Contact email</label> <label for="contactEmail" class="p-col-12 p-mb-2 p-md-2 p-mb-md-0">Contact email</label>
<div class="p-col-12 p-md-10"> <div class="p-col-12 p-md-10">
......
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import {ResourceType, Language, Region, Sector, Project, Resource} from "../../model/resource"; import {ResourceType, Language, Region, Sector, Project, Resource, Pest, Crop} from "../../model/resource";
import {ResourceService} from "../../service/resource.service"; import {ResourceService} from "../../service/resource.service";
import {MessageService} from 'primeng/api'; import {MessageService} from 'primeng/api';
import {Router} from "@angular/router"; import {Router} from "@angular/router";
...@@ -16,6 +16,8 @@ export class AddResourceComponent implements OnInit { ...@@ -16,6 +16,8 @@ export class AddResourceComponent implements OnInit {
resourceTypes: ResourceType[] = []; resourceTypes: ResourceType[] = [];
languages: Language[] = []; languages: Language[] = [];
projects: Project[] = []; projects: Project[] = [];
pests:Pest[] = [];
crops: Crop [] = [];
resource: Resource = {}; resource: Resource = {};
image: any; image: any;
resourceContent: File[] = []; resourceContent: File[] = [];
...@@ -32,6 +34,10 @@ export class AddResourceComponent implements OnInit { ...@@ -32,6 +34,10 @@ export class AddResourceComponent implements OnInit {
this.languages = languages;}); this.languages = languages;});
this.resourceService.getAllProjects().subscribe((projects: Project[]) => { this.resourceService.getAllProjects().subscribe((projects: Project[]) => {
this.projects = projects;}); this.projects = projects;});
this.resourceService.getAllPests().subscribe((pests: Pest[]) => {
this.pests = pests;});
this.resourceService.getAllCrops().subscribe((crops: Crop[]) => {
this.crops = crops;});
} }
saveResource(){ saveResource(){
......
.imageSizeHome{
height: auto;
width: auto;
max-width: 300px;
max-height: 300px;
}
.card { .card {
padding: 2rem; padding: 2rem;
box-shadow: 0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12); box-shadow: 0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12);
......
...@@ -44,14 +44,14 @@ ...@@ -44,14 +44,14 @@
<p-dataView #dv [value]="resources" [paginator]="true" [rows]="6" layout="grid"> <p-dataView #dv [value]="resources" [paginator]="true" [rows]="6" layout="grid">
<ng-template let-resource pTemplate="gridItem"> <ng-template let-resource pTemplate="gridItem">
<div class="p-col-12 p-md-4"> <div class="p-col-12 p-md-4">
<p-card header="{{resource.resourceName}}" subheader="" styleClass="p-card-shadow"> <p-card header="{{resource.resourceName}}" subheader="" styleClass="p-card-shadow" routerLink="/resource/{{resource.idResource}}">
<ng-template pTemplate="header"> <ng-template pTemplate="header">
<div class="p-pb-1 button-right"> <div class="p-pb-1 button-right">
<p-tag *ngIf="resource.resourceType" [rounded]=true value="{{resource.resourceType.name}}"> <p-tag *ngIf="resource.resourceType" [rounded]=true value="{{resource.resourceType.name}}">
</p-tag> </p-tag>
</div> </div>
<img alt="Card" [src]="imagePath+'/'+resource.idResource"> <img [src]="imagePath+'/'+resource.idResource" class="imageSizeHome">
<img class="flag" alt="Card" [src]="'assets/flags/'+resource.language.name.toLowerCase()+'.svg'"> <img class="flag" [src]="'assets/flags/'+resource.language.name.toLowerCase()+'.svg'">
</ng-template> </ng-template>
<div *ngFor="let sector of resource.relevantSectors" class="horizontal"> <div *ngFor="let sector of resource.relevantSectors" class="horizontal">
<ng-container [ngSwitch]=sector.idSector> <ng-container [ngSwitch]=sector.idSector>
......
.imageSize{ .imageSize{
width:100%; height: auto;
width: 100%;
max-height: 400px;
} }
.horizontal{ .horizontal{
padding:5px; padding:5px;
...@@ -13,3 +15,6 @@ ...@@ -13,3 +15,6 @@
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
} }
.button-link{
background-color: unset !important;
}
<div class="p-grid p-pt-6 p-pl-6"> <div class="p-grid p-pt-6 p-pl-6 p-d-flex">
<div class="p-col-6"> <div class="p-d-flex p-col-12">
<h1 class="p-text-center" [ngStyle]="{'flex-grow':1}">{{resource.resourceName}}</h1>
</div>
<div class="p-col-6 p-d-flex p-jc-center">
<img [src]="imagePath+'/'+resource.idResource" class="imageSize" >
</div>
<p-panel header="Short summary" class="p-col-6 p-d-block">
<div class="p-d-flex "> {{resource.description}}</div>
<div class="p-d-flex p-mt-5 ">
<div class="p-d-inline p-col-3 p-my-0"[ngStyle]="{color:'var(--surface-500)'}">Sectors</div>
<div class="p-d-inline p-my-0" *ngFor="let sector of resource.sectors">
<img class="sector p-mx-2" [src]="'assets/sectors/'+sector.sectorIcon" pTooltip="{{sector.name}}">
</div>
</div>
<div class="p-d-flex ">
<div class="p-d-inline p-col-3 p-my-0" [ngStyle]="{color:'var(--surface-500)'}">Regions</div>
<div *ngFor="let region of resource.regions" class="p-d-inline p-my-0">
<img class="sector p-mx-2" [src]="'assets/flags/'+region.name.toLowerCase()+'.svg'" pTooltip="{{region.name}}">
</div>
</div>
<div class="p-d-flex ">
<div class="p-d-inline p-col-3 p-my-0" [ngStyle]="{color:'var(--surface-500)'}">Relevant pest(s)</div>
<div *ngFor="let pest of resource.pests" class="p-d-inline p-my-0">
<p class=" p-my-0 p-py-2 p-mx-2" >{{pest.name}}</p>
</div>
</div>
<div class="p-d-flex ">
<div class="p-d-inline p-col-3 p-my-0" [ngStyle]="{color:'var(--surface-500)'}"> Relevant crop(s)</div>
<p-card header="{{resource.resourceName}}" > <div *ngFor="let crop of resource.crops" class="p-d-inline p-my-0">
<div *ngFor="let keyword of resource.keywords" class="horizontal"> <p class="p-my-0 p-py-2 p-mx-2" >{{crop.name}}</p>
<p-tag value=" {{keyword.name}}"></p-tag>
</div> </div>
<div>
{{resource.language?.name}}
</div>
<div *ngFor="let sector of resource.sectors" class="horizontal">
<ng-container [ngSwitch]=sector.idSector>
<img *ngSwitchCase="1" class="sector" [src]="'assets/sectors/arable.svg'" pTooltip="{{sector.name}}">
<img *ngSwitchCase="5" class="sector" [src]="'assets/sectors/greenhouse.svg'" pTooltip="{{sector.name}}">
<img *ngSwitchCase="3" class="sector"[src]="'assets/sectors/orchard.svg'" pTooltip="{{sector.name}}">
<img *ngSwitchCase="4" class="sector"[src]="'assets/sectors/vegetables.svg'" pTooltip="{{sector.name}}">
<img *ngSwitchCase="2" class="sector" [src]="'assets/sectors/vineyard.svg'" pTooltip="{{sector.name}}">
</ng-container>
</div>
<div>
<div *ngFor="let region of resource.regions" class="horizontal">
<img class="sector" alt="Card" [src]="'assets/flags/'+region.name.toLowerCase()+'.svg'" pTooltip="{{region.name}}">
</div> </div>
</div> </p-panel>
<p-panel class="p-col-6 p-d-inline">
<div class="p-d-flex p-ai-center"><div class="p-col-3 p-d-inline p-my-0" [ngStyle]="{color:'var(--surface-500)'}">Resource language</div><div class=" p-d-inline p-my-0">{{resource.language?.name}}</div></div>
<div class="p-d-flex p-ai-center"><div class="p-col-3 p-d-inline p-my-0" [ngStyle]="{color:'var(--surface-500)'}">Resource origin</div> <div class=" p-d-inline p-my-0">{{resource.resourceOrigin}}</div></div>
<div class="p-d-flex p-ai-center"><div class="p-col-3 p-d-inline p-my-0" [ngStyle]="{color:'var(--surface-500)'}">Country (of origin)</div><div class=" p-d-inline p-my-0"></div>{{resource.countryOrigin?.name}}</div>
<div class="p-d-flex p-ai-center"> <div class="p-col-3 p-d-inline p-my-0" [ngStyle]="{color:'var(--surface-500)'}">Resource type</div><div class=" p-d-inline p-my-0">{{resource.resourceType?.name}}</div></div>
<div class="p-d-flex p-ai-center"><div class="p-col-3 p-d-inline p-my-0" [ngStyle]="{color:'var(--surface-500)'}">Organization name</div><div class=" p-d-inline p-my-0">{{resource.contactInstitution}}</div></div>
<div class="p-d-flex p-ai-center"><div class="p-col-3 p-d-inline p-my-0"[ngStyle]="{color:'var(--surface-500)'}">Contact name</div><div class=" p-d-inline p-my-0"></div>{{resource.contactName}}</div>
<div class="p-d-flex p-ai-center"><div class="p-col-3 p-d-inline p-my-0"[ngStyle]="{color:'var(--surface-500)'}">Contact email</div><div class=" p-d-inline p-my-0"></div>{{resource.contactEmail}}</div>
<div class="p-d-flex p-ai-center"><div class="p-col-3 p-d-inline p-my-0"[ngStyle]="{color:'var(--surface-500)'}">Contact phone</div><div class=" p-d-inline p-my-0">{{resource.contactPhone}}</div></div>
<hr/> <div class="p-d-flex p-ai-center"><div class="p-col-3 p-d-inline p-my-0" [ngStyle]="{color:'var(--surface-500)'}">Resource main url</div><div class=" p-d-inline p-my-0">{{resource.mainURL}}</div></div>
<div class="p-text-italic" [ngStyle]="{color:'var(--green-200)'}"> <div class="p-d-flex p-ai-center"><div class="p-col-3 p-d-inline p-my-0" [ngStyle]="{color:'var(--surface-500)'}">Citation (DOI)</div><div class=" p-d-inline p-my-0">{{resource.citation}}</div></div>
Date of upload:{{resource.idResource}} <div class="p-d-flex p-ai-center"><div class="p-col-3 p-d-inline p-my-0"[ngStyle]="{color:'var(--surface-500)'}">Keywords</div>
<div *ngFor="let keyword of resource.keywords" class="p-col-4 p-d-inline p-my-0">
<p-tag value=" {{keyword.name}}"></p-tag>
</div>
</div>
</p-panel>
<p-panel class="p-col-6" header="Find out more">
<div *ngFor="let link of resource.links" >
<a href="{{link}}">{{link}}</a>
</div> </div>
<div class="p-text-italic" [ngStyle]="{color:'var(--green-200)'}"> <div class="p-mt-2" *ngFor="let file of resource.fileNames" >
Uploaded by: {{resource.idResource}} <i class="pi pi-file p-mr-2" style="font-size: 2rem"></i>
<button pButton type="button" label="{{file}}" class="p-button-link button-link" (click)="downloadFile(file)"></button>
</div> </div>
<div> <h3>Summary description</h3>{{resource.description}}</div> </p-panel>
</p-card>
</div>
<div class="p-col-3">
<img alt="Card" [src]="imagePath+'/'+resource.idResource" class="imageSize">
<div>
<h3>Links and downloads</h3>
<div *ngFor="let link of resource.links" >
<a href="{{link}}">{{link}}</a>
</div>
</div>
</div>
<div class="p-col-12 p-pt-3 button-center"> <div class="p-col-12 p-pt-3 button-center">
<p-button label="Back to search" icon="pi pi-search" routerLink="/home" [loading]="false"></p-button> <p-button label="Back to search" icon="pi pi-search" routerLink="/home" [loading]="false"></p-button>
</div> </div>
......
...@@ -12,6 +12,8 @@ import {Resource} from "../../model/resource"; ...@@ -12,6 +12,8 @@ import {Resource} from "../../model/resource";
export class ResourceComponent implements OnInit { export class ResourceComponent implements OnInit {
resource: Resource ={}; resource: Resource ={};
imagePath = environment.baseUrl+"/resource/image"; imagePath = environment.baseUrl+"/resource/image";
filePath = environment.baseUrl+"/resource/file";
url:any;
constructor(private resourceService:ResourceService, private route: ActivatedRoute) { } constructor(private resourceService:ResourceService, private route: ActivatedRoute) { }
...@@ -23,5 +25,20 @@ export class ResourceComponent implements OnInit { ...@@ -23,5 +25,20 @@ export class ResourceComponent implements OnInit {
}); });
} }
downloadFile(fileName: any): void {
console.log("file")
this.resourceService.downloadFile(fileName).subscribe((file: any) => {
const blob = new Blob([file], {type: 'application/pdf'});
this.url = window.URL.createObjectURL(file);
const link = document.createElement('a');
link.href = this.url;
link.download = fileName;
link.click();
}, error => {
console.log(error)
});
}
} }
...@@ -3,10 +3,14 @@ export interface Resource { ...@@ -3,10 +3,14 @@ export interface Resource {
resourceName?: string; resourceName?: string;
description?: string; description?: string;
links?:string[]; links?:string[];
fileNames?:string[];
resourceOrigin?: string; resourceOrigin?: string;
countryOrigin?:Country;
resourceType?: ResourceType; resourceType?: ResourceType;
sectors?: Sector[]; sectors?: Sector[];
regions?: Region[]; regions?: Region[];
crops?:Crop[];
pests?:Pest[];
keywordsTemp?:string[]; keywordsTemp?:string[];
keywords?: Keyword[]; keywords?: Keyword[];
language?: Language; language?: Language;
...@@ -15,9 +19,22 @@ export interface Resource { ...@@ -15,9 +19,22 @@ export interface Resource {
contactInstitution?: string; contactInstitution?: string;
contactEmail?: string; contactEmail?: string;
contactPhone?: string; contactPhone?: string;
mainURL?:string;
citation?:string;
} }
export class Country{
public idCountry!:string;
public name!: string;
}
export class Crop{
public idCrop!:string;
public name!: string;
}
export class Pest{
public idPest!:string;
public name!: string;
}
export class ResourceType{ export class ResourceType{
public idResourceType!:string; public idResourceType!:string;
public name!: string; public name!: string;
...@@ -25,6 +42,7 @@ export class ResourceType{ ...@@ -25,6 +42,7 @@ export class ResourceType{
export class Sector{ export class Sector{
public idSector!: string; public idSector!: string;
public name!: string; public name!: string;
public sectorIcon!:string;
} }
export class Region{ export class Region{
public idRegion!: string; public idRegion!: string;
......
...@@ -4,7 +4,7 @@ import {HttpClient} from "@angular/common/http"; ...@@ -4,7 +4,7 @@ import {HttpClient} from "@angular/common/http";
import {AppConfig} from "../../config/app.config"; import {AppConfig} from "../../config/app.config";
import {ResourceType, Language, Region, Resource, Sector, Project, Keyword} from "../model/resource"; import {ResourceType, Language, Region, Resource, Sector, Project, Keyword, Pest, Crop} from "../model/resource";
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
...@@ -19,9 +19,15 @@ export class ResourceService { ...@@ -19,9 +19,15 @@ export class ResourceService {
public getAllResources() { public getAllResources() {
return this._httpClient.get<Resource[]>(`${AppConfig.ApiPaths.getAllResources}`); return this._httpClient.get<Resource[]>(`${AppConfig.ApiPaths.getAllResources}`);
} }
public getResource(id:number) { public getResource(id:string) {
return this._httpClient.get<Resource>(`${AppConfig.ApiPaths.getResource}`+"/"+id); return this._httpClient.get<Resource>(`${AppConfig.ApiPaths.getResource}`+"/"+id);
} }
public downloadFile(name: string) {
const httpOptions = {
responseType: 'blob' as 'json',
};
return this._httpClient.get<Resource>(`${AppConfig.ApiPaths.getFile}`+"/"+name, httpOptions);
}
public saveResource(resource: Resource) { public saveResource(resource: Resource) {
return this._httpClient.post<Resource>(`${AppConfig.ApiPaths.saveResource}`, resource); return this._httpClient.post<Resource>(`${AppConfig.ApiPaths.saveResource}`, resource);
} }
...@@ -49,6 +55,12 @@ export class ResourceService { ...@@ -49,6 +55,12 @@ export class ResourceService {
public getAllProjects() { public getAllProjects() {
return this._httpClient.get<Project[]>(`${AppConfig.ApiPaths.getAllProjects}`); return this._httpClient.get<Project[]>(`${AppConfig.ApiPaths.getAllProjects}`);
} }
public getAllPests() {
return this._httpClient.get<Pest[]>(`${AppConfig.ApiPaths.getAllPests}`);
}
public getAllCrops() {
return this._httpClient.get<Crop[]>(`${AppConfig.ApiPaths.getAllCrops}`);
}
public getAllKeywords() { public getAllKeywords() {
return this._httpClient.get<Keyword[]>(`${AppConfig.ApiPaths.getAllKeywords}`); return this._httpClient.get<Keyword[]>(`${AppConfig.ApiPaths.getAllKeywords}`);
......
...@@ -7,6 +7,8 @@ export class AppConfig { ...@@ -7,6 +7,8 @@ export class AppConfig {
public static ApiPaths = { public static ApiPaths = {
getAllResources: `${AppConfig.Origin}/resource/getAllResources`, getAllResources: `${AppConfig.Origin}/resource/getAllResources`,
getResource: `${AppConfig.Origin}/resource/get`, getResource: `${AppConfig.Origin}/resource/get`,
getFile: `${AppConfig.Origin}/resource/file`,
saveResource: `${AppConfig.Origin}/resource/saveResource`, saveResource: `${AppConfig.Origin}/resource/saveResource`,
addFile: `${AppConfig.Origin}/resource/add`, addFile: `${AppConfig.Origin}/resource/add`,
...@@ -16,6 +18,8 @@ export class AppConfig { ...@@ -16,6 +18,8 @@ export class AppConfig {
getAllRegions: `${AppConfig.Origin}/codebooks/getAllRegions`, getAllRegions: `${AppConfig.Origin}/codebooks/getAllRegions`,
getAllResourceTypes: `${AppConfig.Origin}/codebooks/getAllResourceTypes`, getAllResourceTypes: `${AppConfig.Origin}/codebooks/getAllResourceTypes`,
getAllProjects: `${AppConfig.Origin}/codebooks/getAllProjects`, getAllProjects: `${AppConfig.Origin}/codebooks/getAllProjects`,
getAllPests: `${AppConfig.Origin}/codebooks/getAllPests`,
getAllCrops: `${AppConfig.Origin}/codebooks/getAllCrops`,
getAllKeywords: `${AppConfig.Origin}/codebooks/getAllKeywords` getAllKeywords: `${AppConfig.Origin}/codebooks/getAllKeywords`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment