regisrtry rk023
parent
6bdf8cb960
commit
8a34916e2b
|
|
@ -504,6 +504,10 @@
|
|||
{
|
||||
"replace": "src/app/_modules/registries/registry/entries/entry/registry-entry.component.ts",
|
||||
"with": "src/tk023/component/registries/registry/entries/entry/registry-entry.component.ts"
|
||||
},
|
||||
{
|
||||
"replace": "src/app/_modules/registries/registry/entries/entry/properties/entry-properties.component.ts",
|
||||
"with": "src/tk023/component/registries/registry/entries/entry/properties/entry-properties.component.ts"
|
||||
}
|
||||
],
|
||||
"inlineStyleLanguage": "scss",
|
||||
|
|
@ -575,6 +579,10 @@
|
|||
{
|
||||
"replace": "src/app/_modules/registries/registry/entries/entry/registry-entry.component.ts",
|
||||
"with": "src/tk023/component/registries/registry/entries/entry/registry-entry.component.ts"
|
||||
},
|
||||
{
|
||||
"replace": "src/app/_modules/registries/registry/entries/entry/properties/entry-properties.component.ts",
|
||||
"with": "src/tk023/component/registries/registry/entries/entry/properties/entry-properties.component.ts"
|
||||
}
|
||||
],
|
||||
"inlineStyleLanguage": "scss",
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
export const environment = {
|
||||
production: false,
|
||||
apiUrl: 'http://api.nircms.lc',
|
||||
clientId: 4,
|
||||
clientSecret: 'KmGnhqVbEi3wlzkEyXi1JeNg9FtswdOdKQHpOcAu',
|
||||
apiUrl: 'http://api.neftegaz.lc',
|
||||
clientId: 2,
|
||||
clientSecret: 'l96iMO2w2V8NwhBzHbVFbLfvregctHVxWsD4Lo37',
|
||||
project: null,
|
||||
licence: 'POUFLO4YW7SU',
|
||||
defaultLocale: 'ru'
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<router-outlet name="auth"></router-outlet>
|
||||
<router-outlet name="slider"></router-outlet>
|
||||
|
||||
<div>
|
||||
<div class="grid-design">
|
||||
<header class="space"></header>
|
||||
<div class="space content-sapce">
|
||||
<div class="content-grid layout-corral">
|
||||
|
|
|
|||
|
|
@ -1,16 +1,19 @@
|
|||
<div class="header layout-corral">
|
||||
<div class="header-top-menu">
|
||||
<div class="header-top-menu-logo">
|
||||
<a class="burger" (click)="openMobileMenu()">
|
||||
<ico ico="burger"></ico>
|
||||
</a>
|
||||
<a class="header-top-menu-logo" [routerLink]="rootPage?.link">
|
||||
<img src="assets/images/logo.svg" alt="">
|
||||
</div>
|
||||
</a>
|
||||
<a class="header-top-menu-ref">
|
||||
<ico ico="search_24" [size]="24"></ico>
|
||||
</a>
|
||||
<locale></locale>
|
||||
<a class="header-top-menu-ref" (click)="login()" *ngIf="!isLoggedIn">
|
||||
<a class="header-top-menu-login" (click)="login()" *ngIf="!isLoggedIn">
|
||||
<ico ico="profile_24" [size]="24"></ico>
|
||||
</a>
|
||||
<header-user-bar></header-user-bar>
|
||||
<header-user-bar *ngIf="isLoggedIn"></header-user-bar>
|
||||
<a class="btn outline" href="">
|
||||
МТК 523
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
<table class="default">
|
||||
<tr *ngFor="let field of fields" [ngSwitch]="field.type">
|
||||
<td class="caption">{{field.title}}</td>
|
||||
<td *ngSwitchCase="'document'">
|
||||
<div class="documents list default">
|
||||
<div class="items">
|
||||
<div class="item"><a [href]="field.value?.links?.open" target="_blank">{{field.value?.name}}</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td *ngSwitchDefault class="value">{{getValue(field)}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
import {Component, Input} from '@angular/core';
|
||||
import {RegistryEntriesService} from "@app/_services/registry-entries.service";
|
||||
import {ObjectsService} from "@app/_services";
|
||||
import {DatePipe} from "@angular/common";
|
||||
|
||||
@Component({
|
||||
selector: 'entry-properties',
|
||||
templateUrl: 'entry-properties.component.html',
|
||||
styleUrls: ['entry-properties.component.scss']
|
||||
})
|
||||
export class EntryPropertiesComponent {
|
||||
@Input() entry: any;
|
||||
@Input() bar: number;
|
||||
@Input() expande: boolean;
|
||||
|
||||
constructor(private entriesService: RegistryEntriesService, private objectsService: ObjectsService, private datePipe: DatePipe) {
|
||||
}
|
||||
|
||||
get fields() {
|
||||
let fields = this.objectsService.parsedFields(this.entry.properties?.data)
|
||||
.filter(field => {return field.value?.length || field.value?.id});
|
||||
if (!this.expande) fields = fields.slice(0,this.bar)
|
||||
return fields
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.fetch();
|
||||
}
|
||||
|
||||
fetch() {
|
||||
let include = ['properties.groups.fields.value'];
|
||||
this.entriesService.show(this.entry.id, {include: include.join(',')}).subscribe(res => {
|
||||
this.entry = res.data;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
getValue(field: any) {
|
||||
let value = Array.isArray(field.value) ? field.value : [field.value];
|
||||
return value.filter(val => {return val?.length || val?.id;}).map(val => {
|
||||
if (field.type === 'date') return this.datePipe.transform(val, 'dd.MM.yyyy');
|
||||
else return val?.caption || val?.title || val;
|
||||
}).join('; ');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -3,7 +3,8 @@
|
|||
<div class="name">
|
||||
<div *ngIf="link">
|
||||
<a [href]="link" target="_blank">
|
||||
<ico ico="document_24"></ico> {{title}}
|
||||
<!-- <ico ico="document_24"></ico> -->
|
||||
{{title}}
|
||||
</a>
|
||||
</div>
|
||||
<span *ngIf="!link">{{title}}</span>
|
||||
|
|
@ -28,9 +29,9 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="details" *ngIf="isExpanded && withToggle">
|
||||
<div class="details" >
|
||||
<div class="block" *ngIf="registryOptions?.properties">
|
||||
<entry-properties [entry]="entry"></entry-properties>
|
||||
<entry-properties [entry]="entry" [bar]="bar" [expande]="isExpanded && withToggle"></entry-properties>
|
||||
</div>
|
||||
<div class="block" *ngIf="registryOptions?.operations">
|
||||
<entry-operations [entry]="entry" [editMode]="editMode"></entry-operations>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ export class RegistryEntryComponent {
|
|||
constructor(private entriesService: RegistryEntriesService, private formsService: FormsService, private listsService: ListsService, private datePipe: DatePipe) {
|
||||
}
|
||||
|
||||
|
||||
get operationsListId() {
|
||||
return this.entry.id;
|
||||
}
|
||||
|
|
@ -51,9 +50,17 @@ export class RegistryEntryComponent {
|
|||
return this.registry?.type?.options || this.entry?.registry?.data.type?.options;
|
||||
}
|
||||
|
||||
get bar(){
|
||||
switch(this.registry.type.name){
|
||||
case 'notice': return 2;
|
||||
}
|
||||
return 2
|
||||
}
|
||||
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
console.log('registry', this.registry.type)
|
||||
console.log('entry', this.entry)
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,12 @@
|
|||
.grid-design{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh;
|
||||
.content-sapce{
|
||||
flex-grow: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.center{
|
||||
align-items: center;
|
||||
}
|
||||
|
|
@ -31,7 +40,6 @@
|
|||
.content-grid{
|
||||
padding: 32px 48px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 40px;
|
||||
left-content{
|
||||
flex-basis: 272px;
|
||||
|
|
@ -138,7 +146,7 @@ footer{
|
|||
max-width: 100vw;
|
||||
}
|
||||
}
|
||||
right-content, left-content{
|
||||
right-content{
|
||||
display: none;
|
||||
}
|
||||
.jumbotron-edit-field{
|
||||
|
|
@ -146,16 +154,25 @@ footer{
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
@media screen and (max-width: 900px){
|
||||
.space{
|
||||
.layout-corral, .page-corral{
|
||||
padding: 0 24px;
|
||||
@media screen and (max-width: 1048px){
|
||||
.content-grid{
|
||||
padding: 32px 24px;
|
||||
left-content{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.copyright{
|
||||
flex-direction: column;
|
||||
gap: 24px;
|
||||
|
||||
footer{
|
||||
.footer{
|
||||
padding: 16px 24px 32px;
|
||||
flex-direction: column;
|
||||
flex-wrap: nowrap;
|
||||
gap: 8px;
|
||||
a, div{
|
||||
text-align: start !important;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,10 +20,13 @@ header{
|
|||
gap: 32px;
|
||||
height: 108px;
|
||||
padding: 16px 48px 12px 48px;
|
||||
.burger{
|
||||
display: none;
|
||||
}
|
||||
.header-top-menu-logo{
|
||||
margin-right: auto;
|
||||
}
|
||||
.header-top-menu-ref{
|
||||
.header-top-menu-ref, .header-top-menu-login{
|
||||
display: flex;
|
||||
align-items: end;
|
||||
gap: 8px;
|
||||
|
|
@ -252,9 +255,7 @@ slider[side="left"]{
|
|||
|
||||
|
||||
|
||||
@media screen and (max-width: 1330px){
|
||||
|
||||
}
|
||||
|
||||
@media screen and (max-width: 900px){
|
||||
slider[side="left"]{
|
||||
|
|
@ -276,6 +277,35 @@ slider-menu{
|
|||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1048px){
|
||||
header{
|
||||
border-bottom: 1px solid var(--light);
|
||||
|
||||
.header.layout-corral{
|
||||
pages-menu{
|
||||
display: none;
|
||||
}
|
||||
.header-top-menu{
|
||||
justify-content: space-between;
|
||||
height: 64px;
|
||||
padding: 16px 24px 12px;
|
||||
.burger{
|
||||
display: flex;
|
||||
}
|
||||
.header-top-menu-logo{
|
||||
margin: 0;
|
||||
img{
|
||||
width: 118px;
|
||||
height: 40px;
|
||||
}
|
||||
}
|
||||
.header-top-menu-ref, locale, .btn{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -164,7 +164,6 @@ registry-entry {
|
|||
display: inline-flex;
|
||||
align-items: flex-start;
|
||||
gap: 16px;
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
.menu-entry{
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" id="ico">
|
||||
<rect x="3" y="6" width="18" height="2" fill="#7D7D7D"/>
|
||||
<rect x="3" y="11" width="18" height="2" fill="#7D7D7D"/>
|
||||
<rect x="3" y="16" width="18" height="2" fill="#7D7D7D"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 285 B |
Loading…
Reference in New Issue