Spaces:
Runtime error
Runtime error
Download fronty/src/app/gym-setup/upload.component.ts from augmentedimaginationhackathon/paperstocode: direct link, hf CLI and curl.
- Browser
- Download file 1.42 kB
-
https://huggingface.co/spaces/augmentedimaginationhackathon/paperstocode/resolve/main/fronty/src/app/gym-setup/upload.component.ts
- Command line
-
hf download hf://spaces/augmentedimaginationhackathon/paperstocode/fronty/src/app/gym-setup/upload.component.ts
-
curl -L -o upload.component.ts https://huggingface.co/spaces/augmentedimaginationhackathon/paperstocode/resolve/main/fronty/src/app/gym-setup/upload.component.ts
1.42 kB
| import { Component, OnInit } from '@angular/core'; | |
| //import {RequestService} from "../services/request-service/request.service"; | |
| import {take} from "rxjs/operators"; | |
| import {ActivatedRoute} from "@angular/router"; | |
| import {FormBuilder, FormGroup, Validators} from "@angular/forms"; | |
| ({ | |
| selector: 'uploader', | |
| templateUrl: './upload.component.html', | |
| styleUrls: ['./upload.component.scss'] | |
| }) | |
| export class UploadComponent implements OnInit { | |
| public readonly numberOfSteps: number = 1; | |
| public stepOne: number = 1; | |
| public currStep: number = 1; | |
| public form: FormGroup; | |
| constructor(//private requestService: RequestService, | |
| private activatedRoute: ActivatedRoute, | |
| private formBuilder: FormBuilder | |
| ) { | |
| this.form = formBuilder.group({ | |
| "paper": [ | |
| "", | |
| //"", | |
| []], | |
| }) | |
| } | |
| public ngOnInit(): void { | |
| //We will use the gym org id to find all gyms which need setup, then set them upbased on their setupstate or w/e | |
| this.activatedRoute.data.subscribe((data) => { | |
| console.log(data) | |
| }) | |
| } | |
| public stepOneContinue() { | |
| console.log(this.form.value) | |
| if(this.stepOne < this.numberOfSteps) { | |
| this.stepOne++; | |
| } else { | |
| this.stepOne = 1 | |
| } | |
| setTimeout(() => { | |
| if(this.currStep < this.numberOfSteps) { | |
| this.currStep++; | |
| } else { | |
| this.currStep = 1 | |
| } | |
| }, 250); | |
| } | |
| } | |