add viewer

This commit is contained in:
Peter Maquiran
2024-02-08 16:17:57 +01:00
parent e6f70cb7e6
commit eb2a665d2a
10 changed files with 146 additions and 39 deletions
@@ -0,0 +1,12 @@
import { z } from "zod";
const Bodyschema = z.object({
SerialNumber: z.string(),
DispatchDocId: z.number(),
FolderID: z.any(),
Subject: z.string(),
Comment: z.string().optional(),
DelegatedUserEmail: z.string().email(),
UserId: z.any(),
DraftIds: z.string(),
})
@@ -0,0 +1,17 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { ViewerAttachmentPage } from './viewer-attachment.page';
const routes: Routes = [
{
path: '',
component: ViewerAttachmentPage
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class ViewerAttachmentPageRoutingModule {}
@@ -0,0 +1,22 @@
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { IonicModule } from '@ionic/angular';
import { ViewerAttachmentPageRoutingModule } from './viewer-attachment-routing.module';
import { ViewerAttachmentPage } from './viewer-attachment.page';
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
ViewerAttachmentPageRoutingModule
],
declarations: [ViewerAttachmentPage],
exports: [ViewerAttachmentPage],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class ViewerAttachmentPageModule {}
@@ -0,0 +1,22 @@
<div class="height-100 d-flex flex-column overflow-hidden">
<div class="overflow-x-auto d-flex pa-10" style="background-color: #d9d9d9;">
<div class="pa-10 mx-10 card-text selected-card ">
<div style="overflow: auto;">
Attachment 1 sdhnfjanshdfhnasdhfahsdfja shdf asdf
123123
</div>
</div>
<div class="pa-10 mx-10 card-text">
<div style="overflow: auto;"s>Attachment 2</div>
</div>
</div>
<div class="height-100" >
<iframe _ngcontent-lxc-c492="" height="100%" width="100%" title="Iframe Example" class="iframe" src="https://gdviewer-dev.dyndns.info/pdfjs/web/viewpdf.aspx?file=/arq/638429873997432492.pdf&amp;i=MjYxIzgjMTA2IzE3IzEyODA5MSNEb2N1bWVudENlbnRlcg==&amp;e=MA==&amp;p=MA==&amp;m=cGF1bG8ucGludG9AZ2FiaW5ldGVkaWdpdGFsLmxvY2Fs&amp;d=MA==&amp;n=UGF1bG8gUGludG8=&amp;mId=MA==&amp;al=MA==&amp;cn=T0E=&amp;wm=RmFsc2U=&amp;L=MA==&amp;attInstance=MA==&amp;OpenFromMail=MA=="></iframe>
</div>
</div>
@@ -0,0 +1,22 @@
.card-text {
width: 150px;
border: 1px solid black;
text-align: center;
background: white;
display: flex;
justify-content: center;
align-items: center;
p {
margin: 0px;
}
}
.selected-card {
border: 3px solid #ffb703;
color: blue;
}
@@ -0,0 +1,24 @@
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { IonicModule } from '@ionic/angular';
import { ViewerAttachmentPage } from './viewer-attachment.page';
describe('ViewerAttachmentPage', () => {
let component: ViewerAttachmentPage;
let fixture: ComponentFixture<ViewerAttachmentPage>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ ViewerAttachmentPage ],
imports: [IonicModule.forRoot()]
}).compileComponents();
fixture = TestBed.createComponent(ViewerAttachmentPage);
component = fixture.componentInstance;
fixture.detectChanges();
}));
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,19 @@
import { Component, OnInit, CUSTOM_ELEMENTS_SCHEMA, Input } from '@angular/core';
import { IonicSlides } from '@ionic/angular';
@Component({
selector: 'app-viewer-attachment',
templateUrl: './viewer-attachment.page.html',
styleUrls: ['./viewer-attachment.page.scss'],
})
export class ViewerAttachmentPage implements OnInit {
swiperModules = [IonicSlides];
@Input() task: string;
constructor() { }
ngOnInit() {
}
}