Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ export class DbTableRowViewComponent implements OnInit, OnDestroy {
foreignKeyMap[fk.column_name] = fk.referenced_column_name;
}

const tableWidgetsNameMap = Object.keys(res.widgets).reduce((acc, key) => {
acc[key] = res.widgets[key].name;
const tableWidgetsNameMap = res.widgets.reduce((acc, widget: Widget) => {
acc[widget.field_name] = widget.name;
return acc;
}, {});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ export class DbTableRowEditComponent implements OnInit {

//parse json fields
const jsonFields = Object.entries(this.tableTypes)
.filter(([key, value]) => value === 'json' || value === 'jsonb' || value === 'array' || value === 'object')
.filter(([key, value]) => value === 'json' || value === 'jsonb' || value === 'array' || value === 'ARRAY' || value === 'object')
.map(jsonField => jsonField[0]);
if (jsonFields.length) {
for (const jsonField of jsonFields) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core

import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatIconModule } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input';
import { MatMenuModule } from '@angular/material/menu';
import { MatMenuTrigger } from '@angular/material/menu';
import { MatTooltipModule } from '@angular/material/tooltip';
import { MatButtonModule } from '@angular/material/button';

@Component({
selector: 'app-icon-picker',
Expand Down Expand Up @@ -38,7 +38,7 @@ export class IconPickerComponent {
constructor() { console.log(this.resetButtonShown, 'resetButtonShown'); }

ngOnInit() {
console.log(this.resetButtonShown, 'resetButtonShown');
this.customIcon = this.icon || '';
}

applyIcon() {
Expand Down
17 changes: 9 additions & 8 deletions frontend/src/app/consts/field-types.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
import { BinaryDataCaptionRowComponent } from '../components/ui-components/row-fields/binary-data-caption/binary-data-caption.component';
import { BooleanRowComponent } from 'src/app/components/ui-components/row-fields/boolean/boolean.component'
import { CodeRowComponent } from '../components/ui-components/row-fields/code/code.component';
import { CountryRowComponent } from '../components/ui-components/row-fields/country/country.component';
import { DateRowComponent } from '../components/ui-components/row-fields/date/date.component';
import { DateTimeRowComponent } from '../components/ui-components/row-fields/date-time/date-time.component';
import { FileRowComponent } from '../components/ui-components/row-fields/file/file.component';
import { ForeignKeyRowComponent } from '../components/ui-components/row-fields/foreign-key/foreign-key.component';
import { IdRowComponent } from '../components/ui-components/row-fields/id/id.component';
import { ImageRowComponent } from '../components/ui-components/row-fields/image/image.component';
import { JsonEditorRowComponent } from '../components/ui-components/row-fields/json-editor/json-editor.component';
import { LongTextRowComponent } from 'src/app/components/ui-components/row-fields/long-text/long-text.component'
import { MoneyRowComponent } from '../components/ui-components/row-fields/money/money.component';
import { NumberRowComponent } from 'src/app/components/ui-components/row-fields/number/number.component';
import { PasswordRowComponent } from '../components/ui-components/row-fields/password/password.component';
import { PhoneRowComponent } from '../components/ui-components/row-fields/phone/phone.component';
import { PointRowComponent } from 'src/app/components/ui-components/row-fields/point/point.component';
import { SelectRowComponent } from '../components/ui-components/row-fields/select/select.component';
import { StaticTextRowComponent } from '../components/ui-components/row-fields/static-text/static-text.component';
import { TextRowComponent } from 'src/app/components/ui-components/row-fields/text/text.component';
import { TimeRowComponent } from '../components/ui-components/row-fields/time/time.component';
import { TimeIntervalRowComponent } from '../components/ui-components/row-fields/time-interval/time-interval.component';
import { IdRowComponent } from '../components/ui-components/row-fields/id/id.component';
import { FileRowComponent } from '../components/ui-components/row-fields/file/file.component';
import { CodeRowComponent } from '../components/ui-components/row-fields/code/code.component';
import { ImageRowComponent } from '../components/ui-components/row-fields/image/image.component';
import { TimeRowComponent } from '../components/ui-components/row-fields/time/time.component';
import { UrlRowComponent } from '../components/ui-components/row-fields/url/url.component';
import { CountryRowComponent } from '../components/ui-components/row-fields/country/country.component';
import { PhoneRowComponent } from '../components/ui-components/row-fields/phone/phone.component';
import { MoneyRowComponent } from '../components/ui-components/row-fields/money/money.component';

export const timestampTypes = ['timestamp without time zone', 'timestamp with time zone', 'timestamp', 'date', 'time without time zone', 'time with time zone' , 'time', 'datetime', 'date time', 'datetime2', 'datetimeoffset', 'curdate', 'curtime', 'now', 'localtime', 'localtimestamp'];
export const defaultTimestampValues = {
Expand Down Expand Up @@ -92,6 +92,7 @@ export const fieldTypes = {
// json-editor
json: JsonEditorRowComponent, //json-editor
jsonb: JsonEditorRowComponent, //json-editor
ARRAY: JsonEditorRowComponent,

//file
bytea: FileRowComponent,
Expand Down