root page
parent
b9aa76fd7e
commit
cf1316b035
|
|
@ -481,6 +481,10 @@
|
|||
"replace": "src/app/_modules/layout/header/header.component.ts",
|
||||
"with": "src/tk023/component/layout/header/header.component.ts"
|
||||
},
|
||||
{
|
||||
"replace": "src/app/_modules/layout/jumbotron/jumbotron.component.ts",
|
||||
"with": "src/tk023/component/layout/jumbotron/jumbotron.component.ts"
|
||||
},
|
||||
{
|
||||
"replace": "src/app/_modules/layout/left-content/left-content.component.ts",
|
||||
"with": "src/tk023/component/layout/left-content/left-content.component.ts"
|
||||
|
|
@ -560,6 +564,10 @@
|
|||
"replace": "src/app/_modules/layout/header/header.component.ts",
|
||||
"with": "src/tk023/component/layout/header/header.component.ts"
|
||||
},
|
||||
{
|
||||
"replace": "src/app/_modules/layout/jumbotron/jumbotron.component.ts",
|
||||
"with": "src/tk023/component/layout/jumbotron/jumbotron.component.ts"
|
||||
},
|
||||
{
|
||||
"replace": "src/app/_modules/layout/left-content/left-content.component.ts",
|
||||
"with": "src/tk023/component/layout/left-content/left-content.component.ts"
|
||||
|
|
|
|||
|
|
@ -39,8 +39,7 @@ export class CardsSectionItemsComponent {
|
|||
}
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.type)
|
||||
console.log(this.slides)
|
||||
|
||||
}
|
||||
get slides(){
|
||||
return this.type.name == 'cards-section-slides'
|
||||
|
|
|
|||
|
|
@ -18,13 +18,7 @@ export class CardsItemDefaultComponent {
|
|||
@Input() card:any;
|
||||
|
||||
ngOnInit(){
|
||||
// console.log(this.card)
|
||||
// console.log(this.objectsService.getValue(this.card, 'card-style'))
|
||||
// console.log(this.objectsService.getValue(this.card, 'header'))
|
||||
// console.log(this.objectsService.getValue(this.card, 'subheader'))
|
||||
// console.log(this.objectsService.getValue(this.card, 'text'))
|
||||
// console.log(this.objectsService.getValue(this.card, 'image'))
|
||||
// console.log(this.objectsService.getValue(this.card, 'link'))
|
||||
|
||||
}
|
||||
|
||||
get style() {
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@ export class PublicationsListComponent {
|
|||
fetch(controls: any) {
|
||||
controls.filters.page = this.page.id;
|
||||
let include = ['posters'];
|
||||
console.log('controls.page',controls.page)
|
||||
let params = {page: controls.page || 1, filters: JSON.stringify(controls.filters), include: include.join(',')};
|
||||
this.publicationsService.list(params).subscribe(result => {
|
||||
this.listsService.result(this.listId).next(result);
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ export class RegistryEntriesComponent {
|
|||
fetch(controls: any) {
|
||||
let include = ['asset'];
|
||||
if (!this.registry) include.push('registry');
|
||||
console.log('controls', controls)
|
||||
this.entriesService.list({page: controls.page || 0, filters: JSON.stringify(controls.filters), include: include.join(',')}).subscribe(res => {
|
||||
this.listsService.result(this.listId).next(res);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
export const environment = {
|
||||
production: true,
|
||||
apiUrl: 'https://api-vniigaz-cert-v2.testnir.ru',
|
||||
apiUrl: 'https://api-neftegaz.testnir.ru',
|
||||
clientId: 2,
|
||||
clientSecret: 'uMYJ7jTYfSKst631D9gKlSwlNF0bWlcrR1d5mTKX',
|
||||
clientSecret: 'MVvOtr4mINuBsar8F5tohRZdZb2gMjbP0UeErIL9',
|
||||
project: null,
|
||||
licence: '',
|
||||
licence: 'URGJPG2N7IDC',
|
||||
defaultLocale: 'ru'
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,16 +3,29 @@
|
|||
// The list of file replacements can be found in `angular.json`.
|
||||
|
||||
export const environment = {
|
||||
|
||||
// production: true,
|
||||
// apiUrl: ' https://api-vniigaz-cert-v3.testnir.ru',
|
||||
// clientId: 2,
|
||||
// clientSecret: 'hqhpnNTBrvqiv4o85ZNCewOO8n3Y2i9iaRYGfMnt',
|
||||
// project: null,
|
||||
// licence: 'WMBTLLDIE6RC',
|
||||
// defaultLocale: 'ru'
|
||||
|
||||
production: true,
|
||||
apiUrl: ' https://api-vniigaz-cert-v3.testnir.ru',
|
||||
apiUrl: ' https://vniigaz-cert.ru',
|
||||
clientId: 2,
|
||||
clientSecret: 'hqhpnNTBrvqiv4o85ZNCewOO8n3Y2i9iaRYGfMnt',
|
||||
project: null,
|
||||
licence: 'WMBTLLDIE6RC',
|
||||
licence: 'WWFPAMDIANH3',
|
||||
defaultLocale: 'ru'
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* For easier debugging in development mode, you can import the following file
|
||||
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
|
||||
|
|
|
|||
|
|
@ -32,16 +32,12 @@ export class GridComponent {
|
|||
this.pagesService.currentPageSubject.subscribe(
|
||||
currentPage=>{
|
||||
if(currentPage && this.isRootPage){
|
||||
console.log('currentPage',currentPage.link)
|
||||
this.pagesService.find(currentPage.link,{include: 'children.children'}).subscribe(
|
||||
resp=> {
|
||||
let children = resp.data.children.data;
|
||||
console.log('children',children)
|
||||
this.news = children.find(
|
||||
(child:any) => {
|
||||
console.log('child',child)
|
||||
if (!child.children.data.length) {
|
||||
console.log('notChild',child)
|
||||
return false
|
||||
} else {
|
||||
return child.children.data.reduce(
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
<div class="grid-design">
|
||||
<header class="space"></header>
|
||||
<jumbotron class="space" *ngIf="isRootPage"></jumbotron>
|
||||
<div class="space content-sapce">
|
||||
<div class="content-grid layout-corral">
|
||||
<left-content *ngIf="currentPage"></left-content>
|
||||
|
|
|
|||
|
|
@ -32,16 +32,12 @@ export class GridComponent {
|
|||
this.pagesService.currentPageSubject.subscribe(
|
||||
currentPage=>{
|
||||
if(currentPage && this.isRootPage){
|
||||
console.log('currentPage',currentPage.link)
|
||||
this.pagesService.find(currentPage.link,{include: 'children.children'}).subscribe(
|
||||
resp=> {
|
||||
let children = resp.data.children.data;
|
||||
console.log('children',children)
|
||||
this.news = children.find(
|
||||
(child:any) => {
|
||||
console.log('child',child)
|
||||
if (!child.children.data.length) {
|
||||
console.log('notChild',child)
|
||||
return false
|
||||
} else {
|
||||
return child.children.data.reduce(
|
||||
|
|
|
|||
|
|
@ -0,0 +1,52 @@
|
|||
<div class="layout-corral " *ngIf="pictURL">
|
||||
<div class="jumbotron-img">
|
||||
<img [src]="pictURL" alt="">
|
||||
</div>
|
||||
<div class="jumbotron-board">
|
||||
<div class=" jumbotron-registeries">
|
||||
<a href="uvedomlenie-o-razrabotke"><h2>Разработка стандартов</h2></a>
|
||||
<div *ngFor="let reg of regestries; index as i;">
|
||||
<div *ngIf="i<3">
|
||||
<div class="">
|
||||
<span *ngIf="reg.notificationDate" class="notification-date">{{reg.notificationDate | date : 'dd.MM.yyyy'}} </span>
|
||||
<span *ngIf="reg.yearInclusion" class="year-inclusion">{{reg.yearInclusion}} </span>
|
||||
<span>{{reg.type}} </span>
|
||||
<span class="subcommittee">{{reg.subcommittee}}</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="name">
|
||||
<a [routerLink]="regLink(reg.type)">{{reg.name}}</a>
|
||||
</div>
|
||||
|
||||
<div *ngIf="reg.startDiscussion" class="discussion">
|
||||
<span class="start-discussion">{{reg.startDiscussion | date : 'dd.MM.yyyy'}}</span> -
|
||||
<span class="end-discussion">{{reg.endDiscussion | date : 'dd.MM.yyyy'}}</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="reg.documentType">
|
||||
<span class="document-type">{{reg.documentType}} </span>
|
||||
<span class="designation">{{reg.designation}} </span>
|
||||
<span class="order">{{reg.order}}</span>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class=" jumbotron-news">
|
||||
<a href="novosti"><h2>Новости</h2></a>
|
||||
|
||||
<div *ngFor="let pub of news; index as i;">
|
||||
<div *ngIf="i<3">
|
||||
<span>{{pub.date}} </span>
|
||||
<a [routerLink]="pub.link ">{{pub.name}} </a>
|
||||
</div> <br>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -1,5 +1,8 @@
|
|||
import { Component } from '@angular/core';
|
||||
|
||||
import { PagesService } from '@app/_services/pages.service';
|
||||
import { RegistryEntriesService } from '@app/_services/registry-entries.service';
|
||||
import {PublicationsService} from "@app/_services/publications.service";
|
||||
import { RegistriesService } from '@app/_services/registries.service';
|
||||
|
||||
@Component({
|
||||
selector: 'jumbotron',
|
||||
|
|
@ -8,5 +11,123 @@ import { Component } from '@angular/core';
|
|||
})
|
||||
export class JumbotronComponent {
|
||||
|
||||
regestries: any[] =[]
|
||||
news: any[] =[]
|
||||
|
||||
constructor(
|
||||
private pagesService: PagesService,
|
||||
private entriesService: RegistryEntriesService,
|
||||
private publicationsService: PublicationsService,
|
||||
private registriesService: RegistriesService
|
||||
){}
|
||||
|
||||
get currentPage(){
|
||||
return this.pagesService.currentPage
|
||||
}
|
||||
|
||||
get pictURL() {
|
||||
return this.currentPage?.picture?.data.links.open;
|
||||
}
|
||||
|
||||
get isRootPage(){
|
||||
return !this.pagesService.currentPage?.parents.data.length && this.pagesService.currentPage
|
||||
}
|
||||
|
||||
ngOnInit(){
|
||||
|
||||
let include = ['sections.type', 'sections.groups.fields.value', 'registry'];
|
||||
this.registriesService.list().subscribe(
|
||||
resp => {
|
||||
console.log('DATA',resp.data)
|
||||
let regID:any = [];
|
||||
regID = regID.concat(
|
||||
resp.data.filter( reg=> reg.type.name == "notice")
|
||||
.map(reg=>({id: reg.id, type:reg.type.title}))
|
||||
)
|
||||
regID = regID.concat(
|
||||
resp.data.filter( reg=> reg.type.name == "approval")
|
||||
.map(reg=>({id: reg.id, type:reg.type.title}))
|
||||
)
|
||||
console.log(regID)
|
||||
|
||||
regID.forEach(reg=>{
|
||||
this.entriesService.list({
|
||||
page:1,
|
||||
filters:JSON.stringify({
|
||||
"registry": reg.id
|
||||
})
|
||||
}).subscribe(resp=>{
|
||||
let include = ['properties.groups.fields.value'];
|
||||
resp.data.forEach(entry => {
|
||||
this.entriesService.show(entry.id,{include: include.join(',')}).subscribe(resp=>{
|
||||
console.log('ENYTY',resp.data)
|
||||
console.log('REG',reg)
|
||||
let properties = resp.data.properties.data.groups.data[0].fields.data;
|
||||
this.regestries.push({
|
||||
type:reg.type,
|
||||
createdAt:resp.data.createdAt,
|
||||
notificationDate: properties.find(prop=>prop.name=='notification-date')?.value.data[0],
|
||||
subcommittee: properties.find(prop=>prop.name=='subcommittee')?.value.data[0],
|
||||
name: resp.data.name,
|
||||
link: resp.data.link,
|
||||
startDiscussion: properties.find(prop=>prop.name=='start-discussion')?.value.data[0],
|
||||
endDiscussion: properties.find(prop=>prop.name=='end-discussion')?.value.data[0],
|
||||
|
||||
yearInclusion: properties.find(prop=>prop.name=='year-inclusion')?.value.data[0],
|
||||
documentType: properties.find(prop=>prop.name=='document-type')?.value.data[0],
|
||||
designation: properties.find(prop=>prop.name=='designation')?.value.data[0],
|
||||
order: properties.find(prop=>prop.name=='order')?.value.data[0],
|
||||
})
|
||||
this.regestries.sort((a,b)=> a.createdAt<b.createdAt?1:-1)
|
||||
})
|
||||
});
|
||||
})
|
||||
})
|
||||
// this.entriesService.list({
|
||||
// page:1,
|
||||
// filters:JSON.stringify({
|
||||
// "registry": regID[0]
|
||||
// })
|
||||
// }).subscribe(resp=>{
|
||||
// let include = ['properties.groups.fields.value'];
|
||||
// resp.data.slice(0,3).forEach(entry => {
|
||||
// this.entriesService.show(entry.id,{include: include.join(',')}).subscribe(resp=>{
|
||||
// let properties = resp.data.properties.data.groups.data[0].fields.data;
|
||||
// this.regestries.push({
|
||||
// notificationDate: properties.find(prop=>prop.name=='notification-date').value.data[0],
|
||||
// subcommittee: properties.find(prop=>prop.name=='subcommittee').value.data[0],
|
||||
// name: resp.data.name,
|
||||
// link: resp.data.link,
|
||||
// startDiscussion: properties.find(prop=>prop.name=='subcommittee').value.data[0],
|
||||
// endDiscussion: properties.find(prop=>prop.name=='subcommittee').value.data[0],
|
||||
// })
|
||||
// })
|
||||
// });
|
||||
// })
|
||||
}
|
||||
);
|
||||
|
||||
// this.registriesService.list().subscribe(resp=>{
|
||||
// console.log('EEEEntry', resp.data)
|
||||
// let regID = resp.data.find( reg=> reg.type.name == "notice").id
|
||||
// console.log('EEEEntry', regID)
|
||||
// })
|
||||
|
||||
this.publicationsService.list({subType: 'publication-news'}).subscribe(resp=>{
|
||||
// console.log('novosti', resp)
|
||||
this.news = resp.data.slice(0,3).map( pub =>
|
||||
({
|
||||
name: pub.name,
|
||||
date: pub.publishDateRus,
|
||||
link: pub.link
|
||||
}))
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
regLink(name){
|
||||
return name=="Приказы об утверждении"?'prikazy-ob-utverzdenii':'uvedomlenie-o-razrabotke'
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,10 +28,7 @@
|
|||
|
||||
|
||||
@media screen and (max-width: 480px) {
|
||||
jumbotron .jumbotron-bg.rootpage-jumbotron .jumbotron-content .jumbotron-content-center h1{
|
||||
font-size: 50px;
|
||||
line-height: 60px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -55,13 +52,31 @@
|
|||
.main-news{
|
||||
margin: 0 !important;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
@media screen and (min-width: 1330px){
|
||||
jumbotron{
|
||||
.layout-corral{
|
||||
padding-inline: 48px;
|
||||
display: block !important;
|
||||
.jumbotron-img{
|
||||
height: 360px;
|
||||
|
||||
img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
object-position: center;
|
||||
}
|
||||
}
|
||||
.jumbotron-board{
|
||||
display: flex;
|
||||
gap: 40px;
|
||||
>div{
|
||||
flex-grow: 1;
|
||||
flex-basis: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
footer{
|
||||
|
|
@ -90,9 +105,7 @@ footer{
|
|||
width: 640px;
|
||||
}
|
||||
|
||||
.jumbotron-edit-field{
|
||||
margin-top: 32px;
|
||||
}
|
||||
|
||||
|
||||
.main-news{
|
||||
margin: 32px;
|
||||
|
|
@ -149,9 +162,7 @@ footer{
|
|||
right-content{
|
||||
display: none;
|
||||
}
|
||||
.jumbotron-edit-field{
|
||||
display: none;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1048px){
|
||||
|
|
|
|||
|
|
@ -41,6 +41,9 @@ header{
|
|||
}
|
||||
.locales-btn{
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 40px;
|
||||
img{
|
||||
width: 22px;
|
||||
border: 1px solid var(--second-dis);
|
||||
|
|
@ -51,7 +54,7 @@ header{
|
|||
}
|
||||
.dropdown{
|
||||
left: -12px;
|
||||
top: 24px;
|
||||
top: 32px;
|
||||
img{
|
||||
border: 1px solid var(--second-dis);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue