mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-19 19:48:45 +00:00
feat(console): angular 10, iam settings, timestamp to date pipe, org iam indicator, general gui fixes and i18n (#270)
* prettier member dialog, iam indicator * changes i18n * fix timestamp conversion, timestamp to date pipe * rm create, update iam policy * add iam policy * add iam section, members component * add iam contributors * gen admin protos * iam member search * update angular * update cdk material * add module for iam members * add iam roles to member dialog * home shortcuts * project view, i18n * lint
This commit is contained in:
@@ -3,11 +3,13 @@ import { NgModule } from '@angular/core';
|
||||
import { MomentModule } from 'ngx-moment';
|
||||
|
||||
import { LocalizedDatePipe } from './localized-date.pipe';
|
||||
import { TimestampToDatePipe } from './timestamp-to-date.pipe';
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
LocalizedDatePipe,
|
||||
TimestampToDatePipe,
|
||||
],
|
||||
imports: [
|
||||
CommonModule,
|
||||
@@ -15,6 +17,7 @@ import { LocalizedDatePipe } from './localized-date.pipe';
|
||||
],
|
||||
exports: [
|
||||
LocalizedDatePipe,
|
||||
TimestampToDatePipe,
|
||||
],
|
||||
})
|
||||
export class PipesModule { }
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
import { Timestamp } from 'google-protobuf/google/protobuf/timestamp_pb';
|
||||
|
||||
@Pipe({
|
||||
name: 'timestampToDate',
|
||||
})
|
||||
export class TimestampToDatePipe implements PipeTransform {
|
||||
|
||||
transform(value: Timestamp.AsObject, ...args: unknown[]): unknown {
|
||||
return this.dateFromTimestamp(value);
|
||||
}
|
||||
|
||||
private dateFromTimestamp(date: Timestamp.AsObject): any {
|
||||
const ts: Date = new Date(date.seconds * 1000 + date.nanos / 1000 / 1000);
|
||||
return ts;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user