diff --git a/package-lock.json b/package-lock.json
index 0fd8d31..f91a41a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -4610,22 +4610,6 @@
}
}
},
- "jasmine": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-4.0.2.tgz",
- "integrity": "sha512-YsrgxJQEggxzByYe4j68eQLOiQeSrPDYGv4sHhGBp3c6HHdq+uPXeAQ73kOAQpdLZ3/0zN7x/TZTloqeE1/qIA==",
- "dev": true,
- "requires": {
- "glob": "^7.1.6",
- "jasmine-core": "^4.0.0"
- }
- },
- "jasmine-core": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-4.0.1.tgz",
- "integrity": "sha512-w+JDABxQCkxbGGxg+a2hUVZyqUS2JKngvIyLGu/xiw2ZwgsoSB0iiecLQsQORSeaKQ6iGrCyWG86RfNDuoA7Lg==",
- "dev": true
- },
"jest-worker": {
"version": "27.5.1",
"resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz",
diff --git a/package.json b/package.json
index 377a52f..041ff88 100644
--- a/package.json
+++ b/package.json
@@ -3,7 +3,6 @@
"version": "0.0.0",
"scripts": {
"ng": "ng",
- "test": "jasmine",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development"
@@ -27,7 +26,6 @@
"@angular/cli": "~13.2.2",
"@angular/compiler-cli": "~13.2.0",
"@types/node": "^12.11.1",
- "jasmine": "^4.0.2",
"typescript": "~4.5.2"
}
}
diff --git a/spec/support/jasmine.json b/spec/support/jasmine.json
deleted file mode 100644
index 6afe603..0000000
--- a/spec/support/jasmine.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "spec_dir": "spec",
- "spec_files": [
- "**/*[sS]pec.?(m)js"
- ],
- "helpers": [
- "helpers/**/*.?(m)js"
- ],
- "env": {
- "stopSpecOnExpectationFailure": false,
- "random": true
- }
-}
diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts
deleted file mode 100644
index d703db0..0000000
--- a/src/app/app-routing.module.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { NgModule } from '@angular/core';
-import { RouterModule, Routes } from '@angular/router';
-import { HomeComponent } from './home.component';
-import { ReportComponent } from './report.component';
-import { ThanksComponent } from './thanks.component';
-
-const routes: Routes = [
- { path: '', component: HomeComponent },
- { path: 'thanks', component: ThanksComponent },
- { path: 'report', component: ReportComponent }
-];
-
-@NgModule({
- imports: [RouterModule.forRoot(routes)],
- exports: [RouterModule]
-})
-export class AppRoutingModule { }
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index 51b5ece..2a5ce6c 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -1,13 +1,39 @@
import { Component } from '@angular/core';
+import { checkin, checkout } from "src/assets/forms";
+
@Component({
selector: 'app-root',
template: `
-
+
+
+
+
+
+
+
`
})
export class AppComponent {
+
+ checkin: Form = checkin;
+ checkout: Form = checkout;
+
+ action: string = "checkout";
ngOnInit() { }
+ switch(action: string) {
+
+ alert("Are you sure?");
+
+ this.action = action;
+
+ }
+
}
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index 13af438..b79eb98 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -7,12 +7,6 @@ import { FormComponent } from './form.component';
import { TextComponent } from './text.component';
import { RadioComponent } from './radio.component';
import { StepComponent } from './step.component';
-import { CameraComponent } from './camera.component';
-import { SignComponent } from './sign.component';
-import { ThanksComponent } from './thanks.component';
-import { AppRoutingModule } from './app-routing.module';
-import { HomeComponent } from './home.component';
-import { ReportComponent } from './report.component';
@NgModule({
declarations: [
@@ -21,16 +15,10 @@ import { ReportComponent } from './report.component';
TextComponent,
RadioComponent,
StepComponent,
- CameraComponent,
- SignComponent,
- ThanksComponent,
- HomeComponent,
- ReportComponent,
],
imports: [
BrowserModule,
FormsModule,
- AppRoutingModule,
],
providers: [],
bootstrap: [AppComponent]
diff --git a/src/app/camera.component.ts b/src/app/camera.component.ts
deleted file mode 100644
index a05b708..0000000
--- a/src/app/camera.component.ts
+++ /dev/null
@@ -1,58 +0,0 @@
-import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
-
-@Component({
- selector: 'app-camera',
- template: `
-
-
-
-
-
![]()
-
-
-
-
- `
-})
-export class CameraComponent implements OnInit {
-
- @Input() field: Field;
- @Output() update: EventEmitter = new EventEmitter();
-
- video: HTMLVideoElement;
-
- ngOnInit() { console.log("Camera", this.field.id); }
-
- ngAfterViewInit() {
-
- this.video = document.getElementById("video") as HTMLVideoElement;
-
- navigator.mediaDevices.getUserMedia({video: true, audio: false})
-
- .then((stream) => {
- this.video.srcObject = stream;
- this.video.play();
-
- });
-
- }
-
- capture() {
-
- const canvas = document.createElement("canvas") as HTMLCanvasElement;
-
- canvas.width = this.video.videoWidth;
- canvas.height = this.video.videoHeight;
-
- canvas
- .getContext("2d")
- .drawImage(this.video, 0, 0, canvas.width, canvas.height);
-
- this.field.ok = true;
- this.field.value = canvas.toDataURL();
-
- this.update.emit();
-
- }
-
-}
diff --git a/src/app/form.component.ts b/src/app/form.component.ts
index 7347f4f..699009d 100644
--- a/src/app/form.component.ts
+++ b/src/app/form.component.ts
@@ -1,5 +1,4 @@
import { Component, OnInit, Input } from '@angular/core';
-import { Router } from '@angular/router';
@Component({
selector: 'app-form',
@@ -16,7 +15,6 @@ import { Router } from '@angular/router';
>