Compare commits
2 Commits
59bed7c28b
...
d1eae32e4c
Author | SHA1 | Date | |
---|---|---|---|
d1eae32e4c | |||
5a94aa760b |
@ -6,9 +6,9 @@ main {
|
|||||||
grid-gap: 1rem;
|
grid-gap: 1rem;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
justify-self: center;
|
||||||
background-color: #fafafa;
|
background-color: #fafafa;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
justify-self: center;
|
|
||||||
|
|
||||||
& .container {
|
& .container {
|
||||||
border-color: grey;
|
border-color: grey;
|
||||||
|
@ -4,6 +4,16 @@ body, h3 {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
height: 100vh;
|
||||||
|
overflow: auto;
|
||||||
|
margin-top: 3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
margin-bottom: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
section {
|
section {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
@ -100,6 +100,9 @@ export class RedemptionItemEditComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
save() {
|
save() {
|
||||||
|
if (this.formGroups.invalid)
|
||||||
|
return;
|
||||||
|
|
||||||
this.responseError = undefined;
|
this.responseError = undefined;
|
||||||
const order = this.orderFormControl.value;
|
const order = this.orderFormControl.value;
|
||||||
if (order == null) {
|
if (order == null) {
|
||||||
|
@ -3,14 +3,24 @@ import { inject, Injectable } from '@angular/core';
|
|||||||
import { environment } from '../../../environments/environment';
|
import { environment } from '../../../environments/environment';
|
||||||
import TwitchRedemption from '../models/twitch-redemption';
|
import TwitchRedemption from '../models/twitch-redemption';
|
||||||
import { of } from 'rxjs';
|
import { of } from 'rxjs';
|
||||||
|
import EventService from './EventService';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class TwitchRedemptionService {
|
export class TwitchRedemptionService {
|
||||||
private http = inject(HttpClient);
|
private readonly http = inject(HttpClient);
|
||||||
|
private readonly events = inject(EventService);
|
||||||
private twitchRedemptions: TwitchRedemption[] = [];
|
private twitchRedemptions: TwitchRedemption[] = [];
|
||||||
private loaded = false
|
private loaded = false;
|
||||||
|
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
this.events.listen('logoff', () => {
|
||||||
|
this.twitchRedemptions = [];
|
||||||
|
this.loaded = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
fetch(force: boolean = false) {
|
fetch(force: boolean = false) {
|
||||||
if (!force && this.loaded)
|
if (!force && this.loaded)
|
||||||
|
Reference in New Issue
Block a user