implemented UserCollection edit modal + custom collection poster + media access route
This commit is contained in:
1 parent
0ff3c49ca6
commit
e8c4fba943
17 files changed
+498
-72
No files matched your search
@@ -6,6 +6,8 @@ const EntryId = require('../models/EntryId');
|
|||||||
const EntryRating = require('../models/EntryRating');
|
const EntryRating = require('../models/EntryRating');
|
||||||
const { Sequelize } = require('sequelize');
|
const { Sequelize } = require('sequelize');
|
||||||
const router = express.Router();
|
const router = express.Router();
|
||||||
|
const multer = require('multer');
|
||||||
|
const { v4: uuidv4 } = require('uuid');
|
||||||
|
|
||||||
// ! /user-collections
|
// ! /user-collections
|
||||||
// * POST - CREATE UserCollection
|
// * POST - CREATE UserCollection
|
||||||
@@ -65,19 +67,68 @@ router.get('/:id', async (req, res) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const storage = multer.diskStorage({
|
||||||
|
destination: function (req, file, cb) {
|
||||||
|
cb(null, 'uploads/collections/posters/')
|
||||||
|
},
|
||||||
|
filename: function (req, file, cb) {
|
||||||
|
const uniqueFilename = uuidv4();
|
||||||
|
const extension = file.originalname.split('.').pop();
|
||||||
|
cb(null, `${uniqueFilename}.${extension}`);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const upload = multer({ storage: storage });
|
||||||
|
|
||||||
// * PUT - UPDATE A UserCollection
|
// * PUT - UPDATE A UserCollection
|
||||||
router.put('/:id', async (req, res) => {
|
router.put('/:id', upload.single('poster'), async (req, res) => {
|
||||||
try {
|
try {
|
||||||
const { name, description, user_rating, poster_path } = req.body;
|
const userCollectionId = req.params.id;
|
||||||
const [updated] = await UserCollection.update({ name, description, user_rating, poster_path }, { where: { id: req.params.id } });
|
const { name, description, user_rating, is_poster_link } = req.body;
|
||||||
|
|
||||||
|
let poster_path = req.file ? req.file.filename : undefined;
|
||||||
|
|
||||||
|
const updateData = {
|
||||||
|
name,
|
||||||
|
description,
|
||||||
|
user_rating: parseInt(user_rating, 10)
|
||||||
|
};
|
||||||
|
|
||||||
|
if (poster_path) {
|
||||||
|
updateData.poster_path = poster_path;
|
||||||
|
}
|
||||||
|
|
||||||
|
const updated = await UserCollection.update(updateData, {
|
||||||
|
where: { id: userCollectionId }
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!updated[0]) {
|
||||||
|
return res.status(404).json({ message: 'UserCollection not found' });
|
||||||
|
}
|
||||||
|
|
||||||
if (updated) {
|
if (updated) {
|
||||||
const updatedUserCollection = await UserCollection.findByPk(req.params.id);
|
const updatedUserCollection = await UserCollection.findByPk(req.params.id, {
|
||||||
|
include: [{
|
||||||
|
model: Entry,
|
||||||
|
as: 'entries',
|
||||||
|
include: [
|
||||||
|
{ model: EntryId, as: 'entryId' },
|
||||||
|
{ model: EntryRating, as: 'entryRating' }
|
||||||
|
],
|
||||||
|
through: {
|
||||||
|
model: UserCollectionEntry,
|
||||||
|
attributes: ['order'], // attributes (to include) from the join model
|
||||||
|
},
|
||||||
|
}],
|
||||||
|
order: [[Sequelize.literal("`entries->UserCollectionEntry`.`order`"), 'ASC']], // sort by 'order' in ascending order
|
||||||
|
});
|
||||||
|
|
||||||
res.status(200).json(updatedUserCollection);
|
res.status(200).json(updatedUserCollection);
|
||||||
} else {
|
} else {
|
||||||
res.status(404).json({ message: 'UserCollection not found' });
|
res.status(404).json({ message: 'UserCollection not found' });
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
console.log(`UserCollection update (put) error: `, error)
|
||||||
res.status(500).json({ error: error.message });
|
res.status(500).json({ error: error.message });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
+24
-1
@@ -3,6 +3,7 @@ const express = require('express');
|
|||||||
const bodyParser = require('body-parser');
|
const bodyParser = require('body-parser');
|
||||||
const routes = require('./routes/routes.js');
|
const routes = require('./routes/routes.js');
|
||||||
const sequelize = require('./db/database.js');
|
const sequelize = require('./db/database.js');
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
const PORT = process.env.PORT || 4000;
|
const PORT = process.env.PORT || 4000;
|
||||||
@@ -25,9 +26,31 @@ app.use((req, res, next) => {
|
|||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Routes
|
// ? Routes
|
||||||
|
// * media access route
|
||||||
|
app.use('/api/v1/media/:category/:type', (req, res, next) => {
|
||||||
|
const category = req.params.category;
|
||||||
|
const type = req.params.type;
|
||||||
|
|
||||||
|
if (!['entries', 'collections', 'franchises'].includes(category)) {
|
||||||
|
return res.status(404).send('Not Found');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!['banners', 'posters', 'others'].includes(type)) {
|
||||||
|
return res.status(404).send('Not Found');
|
||||||
|
}
|
||||||
|
|
||||||
|
const options = {
|
||||||
|
fallthrough: false, // ! Important: don't call next middleware if file isn't found
|
||||||
|
};
|
||||||
|
|
||||||
|
express.static(path.join(__dirname, '..', `uploads/${category}/${type}`), options)(req, res, next);
|
||||||
|
});
|
||||||
|
|
||||||
|
// * other api routes
|
||||||
app.use('/api/v1', routes);
|
app.use('/api/v1', routes);
|
||||||
|
|
||||||
|
|
||||||
// Start the server
|
// Start the server
|
||||||
const relations = require('./db/relations.js');
|
const relations = require('./db/relations.js');
|
||||||
const sequelizeHooks = require('./db/sequelizeHooks.js');
|
const sequelizeHooks = require('./db/sequelizeHooks.js');
|
||||||
|
|||||||
@@ -20,11 +20,27 @@ import { LibraryComponent } from './features/library/library.component';
|
|||||||
import { DynamicEntryListComponent } from './shared/components/lists/dynamic-entry-list/dynamic-entry-list.component';
|
import { DynamicEntryListComponent } from './shared/components/lists/dynamic-entry-list/dynamic-entry-list.component';
|
||||||
import { NotificationPopupComponent } from './shared/components/notification-popup/notification-popup.component';
|
import { NotificationPopupComponent } from './shared/components/notification-popup/notification-popup.component';
|
||||||
import { MainCardComponent } from './shared/components/cards/main-card/main-card.component';
|
import { MainCardComponent } from './shared/components/cards/main-card/main-card.component';
|
||||||
import { UserCollectionsModalComponent } from './shared/components/modals/list-selection-modal/user-collections-modal.component';
|
|
||||||
import { FavoritComponent } from './features/favorit/favorit.component';
|
import { FavoritComponent } from './features/favorit/favorit.component';
|
||||||
import { WatchlistComponent } from './features/watchlist/watchlist.component';
|
import { WatchlistComponent } from './features/watchlist/watchlist.component';
|
||||||
|
import { SharedModule } from './shared/shared.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
CoreModule,
|
||||||
|
SharedModule,
|
||||||
|
|
||||||
|
AppRoutingModule,
|
||||||
|
|
||||||
|
BrowserModule,
|
||||||
|
BrowserAnimationsModule,
|
||||||
|
FormsModule,
|
||||||
|
ReactiveFormsModule,
|
||||||
|
|
||||||
|
HttpClientModule,
|
||||||
|
|
||||||
|
DragDropModule,
|
||||||
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
AppComponent,
|
AppComponent,
|
||||||
|
|
||||||
@@ -41,21 +57,6 @@ import { WatchlistComponent } from './features/watchlist/watchlist.component';
|
|||||||
MainCardComponent,
|
MainCardComponent,
|
||||||
DynamicEntryListComponent,
|
DynamicEntryListComponent,
|
||||||
NotificationPopupComponent,
|
NotificationPopupComponent,
|
||||||
UserCollectionsModalComponent,
|
|
||||||
],
|
|
||||||
imports: [
|
|
||||||
CoreModule,
|
|
||||||
CommonModule,
|
|
||||||
|
|
||||||
AppRoutingModule,
|
|
||||||
|
|
||||||
BrowserModule,
|
|
||||||
BrowserAnimationsModule,
|
|
||||||
HttpClientModule,
|
|
||||||
ReactiveFormsModule,
|
|
||||||
FormsModule,
|
|
||||||
|
|
||||||
DragDropModule,
|
|
||||||
],
|
],
|
||||||
providers: [DatePipe],
|
providers: [DatePipe],
|
||||||
bootstrap: [AppComponent],
|
bootstrap: [AppComponent],
|
||||||
|
|||||||
@@ -36,6 +36,17 @@ export class UserCollectionService {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// * PUT - update a collection
|
||||||
|
updateCollection(
|
||||||
|
userCollectionId: number,
|
||||||
|
formData: FormData
|
||||||
|
): Observable<UserCollection> {
|
||||||
|
return this.http.put<UserCollection>(
|
||||||
|
`${this.backend_apiUrl}/${this.apiAction}/${userCollectionId}`,
|
||||||
|
formData
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// Delete a list by ID
|
// Delete a list by ID
|
||||||
deleteCollection(userCollectionId: number): Observable<any> {
|
deleteCollection(userCollectionId: number): Observable<any> {
|
||||||
return this.http.delete(
|
return this.http.delete(
|
||||||
|
|||||||
+9
@@ -0,0 +1,9 @@
|
|||||||
|
.rating {
|
||||||
|
color: var(--shz-gold-1);
|
||||||
|
font-size: 25px;
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error-message {
|
||||||
|
color: var(--shx-red-danger);
|
||||||
|
}
|
||||||
+47
@@ -0,0 +1,47 @@
|
|||||||
|
<div class="card border-top border-3 border-primary rounded-0" style="margin-bottom: 0 !important;">
|
||||||
|
<div class="modal-header card-header py-3 px-4">
|
||||||
|
<h5 class="mb-0 text-primary">Collection Details</h5>
|
||||||
|
<button type="button" class="btn-close" (click)="onClose()" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
<div class="card-body p-4">
|
||||||
|
<form class="row g-3" [formGroup]="form">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<label class="form-label">Collection Name</label>
|
||||||
|
<input type="text" class="form-control rounded-0" formControlName="name">
|
||||||
|
<div *ngIf="form.get('name')?.invalid && form.get('name')?.touched" class="error-message">
|
||||||
|
Name is required
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-12">
|
||||||
|
<label class="form-label">Description</label>
|
||||||
|
<textarea class="form-control rounded-0" formControlName="description" placeholder="Enter a description..."
|
||||||
|
rows="3"></textarea>
|
||||||
|
<div *ngIf="form.get('description')?.invalid && form.get('description')?.touched" class="error-message">
|
||||||
|
Description is required
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-12">
|
||||||
|
<label class="form-label">Rating</label>
|
||||||
|
<div class="d-flex justify-content-center rating">
|
||||||
|
<rating formControlName="user_rating" [max]="10" [readonly]="false">
|
||||||
|
</rating>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-12">
|
||||||
|
<label class="form-label">Poster</label>
|
||||||
|
<input type="file" id="image" (change)="onFileChange($event)">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="d-md-flex d-grid align-items-center gap-3">
|
||||||
|
<button type="button" class="btn btn-primary px-4 rounded-0" (click)="onConfirm()">OK</button>
|
||||||
|
<button type="button" class="btn btn-secondary px-4 rounded-0" (click)="onClose()">Cancel</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
+23
@@ -0,0 +1,23 @@
|
|||||||
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { CollectionEditModalComponent } from './collection-edit-modal.component';
|
||||||
|
|
||||||
|
describe('CollectionEditModalComponent', () => {
|
||||||
|
let component: CollectionEditModalComponent;
|
||||||
|
let fixture: ComponentFixture<CollectionEditModalComponent>;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await TestBed.configureTestingModule({
|
||||||
|
imports: [CollectionEditModalComponent]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
|
||||||
|
fixture = TestBed.createComponent(CollectionEditModalComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
+98
@@ -0,0 +1,98 @@
|
|||||||
|
import { ChangeDetectorRef, Component, Inject, OnInit } from '@angular/core';
|
||||||
|
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||||
|
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||||
|
|
||||||
|
import {
|
||||||
|
trigger,
|
||||||
|
state,
|
||||||
|
style,
|
||||||
|
transition,
|
||||||
|
animate,
|
||||||
|
} from '@angular/animations';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-collection-edit-modal',
|
||||||
|
templateUrl: './collection-edit-modal.component.html',
|
||||||
|
styleUrl: './collection-edit-modal.component.css',
|
||||||
|
animations: [
|
||||||
|
trigger('fadeInOut', [
|
||||||
|
state('in', style({ opacity: 1 })),
|
||||||
|
transition(':enter', [style({ opacity: 0 }), animate(600)]),
|
||||||
|
transition(':leave', [animate(600, style({ opacity: 0 }))]),
|
||||||
|
]),
|
||||||
|
trigger('scaleInOut', [
|
||||||
|
transition(':enter', [
|
||||||
|
state('in', style({ opacity: 1 })),
|
||||||
|
style({ transform: 'scale(0)' }),
|
||||||
|
animate('200ms ease-in-out', style({ transform: 'scale(1)' })),
|
||||||
|
]),
|
||||||
|
transition(':leave', [
|
||||||
|
animate('200ms ease-in-out', style({ transform: 'scale(0)' })),
|
||||||
|
]),
|
||||||
|
]),
|
||||||
|
],
|
||||||
|
})
|
||||||
|
export class CollectionEditModalComponent implements OnInit {
|
||||||
|
form!: FormGroup;
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
public dialogRef: MatDialogRef<CollectionEditModalComponent>,
|
||||||
|
@Inject(MAT_DIALOG_DATA) public data: any,
|
||||||
|
private fb: FormBuilder,
|
||||||
|
private cd: ChangeDetectorRef
|
||||||
|
) {}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
if (this.data == null) return;
|
||||||
|
this.form = this.fb.group({
|
||||||
|
name: [this.data.name, Validators.required],
|
||||||
|
description: [this.data.description],
|
||||||
|
user_rating: [this.data.user_rating],
|
||||||
|
poster: [null],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private markFormGroupTouched(formGroup: FormGroup) {
|
||||||
|
Object.values(formGroup.controls).forEach((control) => {
|
||||||
|
control.markAsTouched();
|
||||||
|
if (control instanceof FormGroup) {
|
||||||
|
this.markFormGroupTouched(control);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onFileChange(event: any) {
|
||||||
|
const file = event.target.files[0];
|
||||||
|
this.form.patchValue({ poster: file });
|
||||||
|
this.form.get('poster')?.updateValueAndValidity();
|
||||||
|
}
|
||||||
|
|
||||||
|
onConfirm(): void {
|
||||||
|
if (this.form.valid) {
|
||||||
|
let formData = new FormData();
|
||||||
|
|
||||||
|
formData.append('name', this.form.get('name')?.value);
|
||||||
|
formData.append('description', this.form.get('description')?.value || '');
|
||||||
|
formData.append(
|
||||||
|
'user_rating',
|
||||||
|
this.form.get('user_rating')?.value.toString()
|
||||||
|
);
|
||||||
|
|
||||||
|
// Check and append file if it exists
|
||||||
|
const posterFile = this.form.get('poster')?.value;
|
||||||
|
if (posterFile) {
|
||||||
|
formData.append('poster', posterFile);
|
||||||
|
}
|
||||||
|
|
||||||
|
formData.append('is_poster_link', 'false');
|
||||||
|
|
||||||
|
this.dialogRef.close({ formData: formData });
|
||||||
|
} else {
|
||||||
|
this.markFormGroupTouched(this.form);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onClose(): void {
|
||||||
|
this.dialogRef.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
.rating {
|
||||||
|
color: var(--shz-gold-1);
|
||||||
|
font-size: 25px;
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
+12
-6
@@ -8,7 +8,7 @@
|
|||||||
<a href="javascript:;">
|
<a href="javascript:;">
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="breadcrumb-item active" aria-current="page">List: {{list.name}}</li>
|
<li class="breadcrumb-item active" aria-current="page">Collections</li>
|
||||||
</ol>
|
</ol>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
@@ -17,18 +17,24 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="d-flex justify-content-between align-items-center mb-2">
|
<div class="d-flex justify-content-between align-items-center mb-2">
|
||||||
<h5 class="mb-0">{{list.name}}</h5>
|
<h5 class="mb-0">{{collection.name}}</h5>
|
||||||
<button type="button" class="btn btn-primary btn-sm">
|
<button type="button" class="btn btn-primary btn-sm" (click)="openEditModal()">
|
||||||
<span class="material-symbols-outlined">
|
<span class="material-symbols-outlined">
|
||||||
edit
|
edit
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div>Created - {{createdAt}} | Updated - {{updatedAt}}</div>
|
<div>Created - {{createdAt}} | Updated - {{updatedAt}}
|
||||||
<div *ngIf="list.description != ''">{{list.description}}</div>
|
<div class="d-flex justify-content-right rating">
|
||||||
|
<rating [(ngModel)]="collection.user_rating" [max]="10" [readonly]="true">
|
||||||
|
</rating>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="collection.description != ''">{{collection.description}}</div>
|
||||||
<hr>
|
<hr>
|
||||||
<div>
|
<div>
|
||||||
<app-userCollection-entry-grid [entries]="list.entries" [listId]="getListId()"></app-userCollection-entry-grid>
|
<app-userCollection-entry-grid [entries]="collection.entries"
|
||||||
|
[listId]="getListId()"></app-userCollection-entry-grid>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
+56
-9
@@ -4,6 +4,8 @@ import { UserCollectionService } from '../../../../core/services/userCollection.
|
|||||||
import { UserCollection } from '../../../../shared/models/userCollection.model';
|
import { UserCollection } from '../../../../shared/models/userCollection.model';
|
||||||
import { DatePipe } from '@angular/common';
|
import { DatePipe } from '@angular/common';
|
||||||
import { CollectionEntry } from '../../../../shared/models/dtos/collection-entry.dto';
|
import { CollectionEntry } from '../../../../shared/models/dtos/collection-entry.dto';
|
||||||
|
import { CollectionEditModalComponent } from '../collection-edit-modal/collection-edit-modal.component';
|
||||||
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-userCollection-info-page',
|
selector: 'app-userCollection-info-page',
|
||||||
@@ -12,13 +14,14 @@ import { CollectionEntry } from '../../../../shared/models/dtos/collection-entry
|
|||||||
providers: [DatePipe],
|
providers: [DatePipe],
|
||||||
})
|
})
|
||||||
export class UserCollectionInfoPageComponent implements OnInit {
|
export class UserCollectionInfoPageComponent implements OnInit {
|
||||||
list: UserCollection = {} as UserCollection;
|
collection: UserCollection = {} as UserCollection;
|
||||||
createdAt: string = '';
|
createdAt: string = '';
|
||||||
updatedAt: string = '';
|
updatedAt: string = '';
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private listService: UserCollectionService,
|
private userCollectionService: UserCollectionService,
|
||||||
|
public dialog: MatDialog,
|
||||||
private datePipe: DatePipe
|
private datePipe: DatePipe
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
@@ -26,14 +29,17 @@ export class UserCollectionInfoPageComponent implements OnInit {
|
|||||||
const id = this.route.snapshot.paramMap.get('id');
|
const id = this.route.snapshot.paramMap.get('id');
|
||||||
if (id == null) return;
|
if (id == null) return;
|
||||||
|
|
||||||
this.listService.getCollection(id.toString()).subscribe(
|
this.userCollectionService.getCollection(id.toString()).subscribe(
|
||||||
(data) => {
|
(data) => {
|
||||||
this.list = data as unknown as UserCollection;
|
this.collection = data as unknown as UserCollection;
|
||||||
this.list.entries = this.list.entries as CollectionEntry[];
|
this.collection.entries = this.collection.entries as CollectionEntry[];
|
||||||
|
|
||||||
this.createdAt = this.getCreatedDate()?.toString() || '';
|
this.createdAt = this.getCreatedDate()?.toString() || '';
|
||||||
this.updatedAt = this.getUpdatedAt()?.toString() || '';
|
this.updatedAt = this.getUpdatedAt()?.toString() || '';
|
||||||
console.log(`Collection "${this.list.name}" received:`, this.list);
|
console.log(
|
||||||
|
`Collection "${this.collection.name}" received:`,
|
||||||
|
this.collection
|
||||||
|
);
|
||||||
},
|
},
|
||||||
(error) => {
|
(error) => {
|
||||||
console.error('Error occurred:', error);
|
console.error('Error occurred:', error);
|
||||||
@@ -42,16 +48,16 @@ export class UserCollectionInfoPageComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getListId() {
|
getListId() {
|
||||||
return this.list.id + '';
|
return this.collection.id + '';
|
||||||
}
|
}
|
||||||
|
|
||||||
getCreatedDate() {
|
getCreatedDate() {
|
||||||
return this.datePipe.transform(this.list.createdAt, 'dd MMMM, yyyy');
|
return this.datePipe.transform(this.collection.createdAt, 'dd MMMM, yyyy');
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO use a relativeDate pipe
|
// TODO use a relativeDate pipe
|
||||||
getUpdatedAt() {
|
getUpdatedAt() {
|
||||||
const updatedAt = this.list.updatedAt;
|
const updatedAt = this.collection.updatedAt;
|
||||||
// First, check if updatedAt is a valid date string or timestamp
|
// First, check if updatedAt is a valid date string or timestamp
|
||||||
const modifiedDate = new Date(updatedAt);
|
const modifiedDate = new Date(updatedAt);
|
||||||
|
|
||||||
@@ -87,4 +93,45 @@ export class UserCollectionInfoPageComponent implements OnInit {
|
|||||||
return this.datePipe.transform(modifiedDate, 'dd MMMM, yyyy');
|
return this.datePipe.transform(modifiedDate, 'dd MMMM, yyyy');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
openEditModal() {
|
||||||
|
if (!this.collection) return;
|
||||||
|
|
||||||
|
const dialogRef = this.dialog.open(CollectionEditModalComponent, {
|
||||||
|
width: '360px',
|
||||||
|
data: {
|
||||||
|
name: this.collection.name,
|
||||||
|
description: this.collection.description,
|
||||||
|
user_rating: this.collection.user_rating || 0,
|
||||||
|
poster: this.collection.poster_path,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log('Edit dialog opened');
|
||||||
|
|
||||||
|
dialogRef.afterClosed().subscribe((result) => {
|
||||||
|
if (result) {
|
||||||
|
if (result.formData == null) return;
|
||||||
|
console.log('Edit dialog closed with:', result);
|
||||||
|
|
||||||
|
this.userCollectionService
|
||||||
|
.updateCollection(this.collection.id, result.formData)
|
||||||
|
.subscribe({
|
||||||
|
next: (userCollection) => {
|
||||||
|
if (userCollection) {
|
||||||
|
// TODO show confirm notification
|
||||||
|
console.log(`User Collection updated: `, userCollection);
|
||||||
|
this.collection = userCollection;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: (error) => {
|
||||||
|
console.error('Error updating userCollection:', error);
|
||||||
|
// TODO show notification
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.log('Edit dialog was cancelled');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,33 +1,41 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { AppRoutingModule } from '../../app-routing.module';
|
|
||||||
import { CollectionsRoutingModule } from './collections-routing.module';
|
|
||||||
import { SharedModule } from '../../shared/shared.module';
|
import { SharedModule } from '../../shared/shared.module';
|
||||||
|
import { CollectionsRoutingModule } from './collections-routing.module';
|
||||||
|
|
||||||
|
import { DragDropModule } from '@angular/cdk/drag-drop';
|
||||||
|
|
||||||
import { UserCollectionsPageComponent } from './user-collections/userCollections-page/userCollections-page.component';
|
import { UserCollectionsPageComponent } from './user-collections/userCollections-page/userCollections-page.component';
|
||||||
import { UserCollectionsListItemComponent } from './user-collections/userCollection-list-item/userCollections-list-item.component';
|
import { UserCollectionsListItemComponent } from './user-collections/userCollection-list-item/userCollections-list-item.component';
|
||||||
import { UserCollectionEntryGridComponent } from './user-collection-info/userCollection-entry-grid/userCollection-entry-grid.component';
|
import { UserCollectionEntryGridComponent } from './user-collection-info/userCollection-entry-grid/userCollection-entry-grid.component';
|
||||||
import { UserCollectionGridCardComponent } from './user-collection-info/userCollection-grid-card/userCollection-grid-card.component';
|
import { UserCollectionGridCardComponent } from './user-collection-info/userCollection-grid-card/userCollection-grid-card.component';
|
||||||
import { UserCollectionInfoPageComponent } from './user-collection-info/userCollection-info-page/userCollection-info-page.component';
|
import { UserCollectionInfoPageComponent } from './user-collection-info/userCollection-info-page/userCollection-info-page.component';
|
||||||
|
import { UserCollectionsModalComponent } from '../../shared/components/modals/list-selection-modal/user-collections-modal.component';
|
||||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||||
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
|
||||||
UserCollectionEntryGridComponent,
|
|
||||||
UserCollectionGridCardComponent,
|
|
||||||
UserCollectionInfoPageComponent,
|
|
||||||
|
|
||||||
UserCollectionsPageComponent,
|
|
||||||
UserCollectionsListItemComponent,
|
|
||||||
],
|
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
SharedModule,
|
SharedModule,
|
||||||
CollectionsRoutingModule,
|
|
||||||
FormsModule,
|
FormsModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
|
|
||||||
|
CollectionsRoutingModule,
|
||||||
|
|
||||||
DragDropModule,
|
DragDropModule,
|
||||||
],
|
],
|
||||||
|
declarations: [
|
||||||
|
// collections list page
|
||||||
|
UserCollectionsPageComponent,
|
||||||
|
UserCollectionsListItemComponent,
|
||||||
|
|
||||||
|
// collection info page
|
||||||
|
UserCollectionInfoPageComponent,
|
||||||
|
UserCollectionEntryGridComponent,
|
||||||
|
UserCollectionGridCardComponent,
|
||||||
|
UserCollectionsModalComponent,
|
||||||
|
],
|
||||||
exports: [],
|
exports: [],
|
||||||
})
|
})
|
||||||
export class UserCollectionsModule {}
|
export class UserCollectionsModule {}
|
||||||
+6
-1
@@ -32,8 +32,13 @@ export class UserCollectionsListItemComponent {
|
|||||||
|
|
||||||
getPostPath() {
|
getPostPath() {
|
||||||
if (this.list.poster_path == null) return 'https://pic.pnnet.dev/256x256';
|
if (this.list.poster_path == null) return 'https://pic.pnnet.dev/256x256';
|
||||||
|
if (this.list.poster_path.startsWith('/'))
|
||||||
|
return `https://image.tmdb.org/t/p/w500` + this.list.poster_path;
|
||||||
|
|
||||||
return `https://image.tmdb.org/t/p/w500` + this.list.poster_path;
|
return (
|
||||||
|
`http://localhost:4000/api/v1/media/collections/posters/` +
|
||||||
|
this.list.poster_path
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
getCreatedDate(): string {
|
getCreatedDate(): string {
|
||||||
|
|||||||
+4
-1
@@ -124,7 +124,10 @@ export class UserCollectionsModalComponent implements OnInit {
|
|||||||
`Adding Entry ${this.entryId} to list: ${userCollection.name}`
|
`Adding Entry ${this.entryId} to list: ${userCollection.name}`
|
||||||
);
|
);
|
||||||
this.listService
|
this.listService
|
||||||
.addEntryToCollection(userCollection.id, this.entryId)
|
.addEntryToCollection(
|
||||||
|
userCollection.id,
|
||||||
|
this.entryId
|
||||||
|
)
|
||||||
.subscribe({
|
.subscribe({
|
||||||
next: (response) => {
|
next: (response) => {
|
||||||
console.log('Successfuly added Entry To Collection:', response);
|
console.log('Successfuly added Entry To Collection:', response);
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
||||||
|
|
||||||
// * cards
|
// * cards
|
||||||
import { SeasonMainCardComponent } from './cards/season-main-card/season-main-card.component';
|
import { SeasonMainCardComponent } from './cards/season-main-card/season-main-card.component';
|
||||||
@@ -13,15 +12,26 @@ import { DateFormatPipe } from './pipes/date-format/date-format.pipe';
|
|||||||
|
|
||||||
// * other
|
// * other
|
||||||
import { RatingModule } from 'ngx-bootstrap/rating';
|
import { RatingModule } from 'ngx-bootstrap/rating';
|
||||||
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||||
|
import { CollectionEditModalComponent } from '../features/collections/user-collection-info/collection-edit-modal/collection-edit-modal.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
|
||||||
|
FormsModule,
|
||||||
|
ReactiveFormsModule,
|
||||||
|
|
||||||
|
RatingModule.forRoot(),
|
||||||
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
// ? pipes
|
// * pipes
|
||||||
DateFormatPipe,
|
DateFormatPipe,
|
||||||
|
|
||||||
// ? components
|
// ? components
|
||||||
SeasonMainCardComponent,
|
SeasonMainCardComponent,
|
||||||
SeenModalComponent,
|
SeenModalComponent,
|
||||||
|
CollectionEditModalComponent
|
||||||
|
|
||||||
// ? other imported components
|
// ? other imported components
|
||||||
|
|
||||||
@@ -33,18 +43,17 @@ import { RatingModule } from 'ngx-bootstrap/rating';
|
|||||||
|
|
||||||
// ? modules
|
// ? modules
|
||||||
],
|
],
|
||||||
imports: [
|
exports: [
|
||||||
CommonModule,
|
// * pipes
|
||||||
|
DateFormatPipe,
|
||||||
|
|
||||||
FormsModule,
|
FormsModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
|
|
||||||
RatingModule.forRoot(),
|
|
||||||
],
|
|
||||||
exports: [
|
|
||||||
//NotificationPopupComponent,
|
//NotificationPopupComponent,
|
||||||
DateFormatPipe,
|
|
||||||
SeasonMainCardComponent,
|
SeasonMainCardComponent,
|
||||||
SeenModalComponent,
|
SeenModalComponent,
|
||||||
|
|
||||||
RatingModule,
|
RatingModule,
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|||||||
Generated
+93
-14
@@ -25,6 +25,7 @@
|
|||||||
"date-fns": "^3.6.0",
|
"date-fns": "^3.6.0",
|
||||||
"express": "^4.19.2",
|
"express": "^4.19.2",
|
||||||
"flatpickr": "^4.6.13",
|
"flatpickr": "^4.6.13",
|
||||||
|
"multer": "^1.4.5-lts.1",
|
||||||
"mysql2": "^3.9.3",
|
"mysql2": "^3.9.3",
|
||||||
"ngx-bootstrap": "^12.0.0",
|
"ngx-bootstrap": "^12.0.0",
|
||||||
"rxjs": "~7.8.0",
|
"rxjs": "~7.8.0",
|
||||||
@@ -5956,6 +5957,11 @@
|
|||||||
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
|
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/append-field": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw=="
|
||||||
|
},
|
||||||
"node_modules/archiver": {
|
"node_modules/archiver": {
|
||||||
"version": "5.3.2",
|
"version": "5.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/archiver/-/archiver-5.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/archiver/-/archiver-5.3.2.tgz",
|
||||||
@@ -6967,8 +6973,7 @@
|
|||||||
"node_modules/buffer-from": {
|
"node_modules/buffer-from": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
|
||||||
"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
|
"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node_modules/builder-util": {
|
"node_modules/builder-util": {
|
||||||
"version": "24.13.1",
|
"version": "24.13.1",
|
||||||
@@ -7164,6 +7169,17 @@
|
|||||||
"semver": "^7.0.0"
|
"semver": "^7.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/busboy": {
|
||||||
|
"version": "1.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz",
|
||||||
|
"integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==",
|
||||||
|
"dependencies": {
|
||||||
|
"streamsearch": "^1.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10.16.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/bytes": {
|
"node_modules/bytes": {
|
||||||
"version": "3.1.2",
|
"version": "3.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
|
||||||
@@ -7733,6 +7749,47 @@
|
|||||||
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
|
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/concat-stream": {
|
||||||
|
"version": "1.6.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
|
||||||
|
"integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
|
||||||
|
"engines": [
|
||||||
|
"node >= 0.8"
|
||||||
|
],
|
||||||
|
"dependencies": {
|
||||||
|
"buffer-from": "^1.0.0",
|
||||||
|
"inherits": "^2.0.3",
|
||||||
|
"readable-stream": "^2.2.2",
|
||||||
|
"typedarray": "^0.0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/concat-stream/node_modules/readable-stream": {
|
||||||
|
"version": "2.3.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz",
|
||||||
|
"integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==",
|
||||||
|
"dependencies": {
|
||||||
|
"core-util-is": "~1.0.0",
|
||||||
|
"inherits": "~2.0.3",
|
||||||
|
"isarray": "~1.0.0",
|
||||||
|
"process-nextick-args": "~2.0.0",
|
||||||
|
"safe-buffer": "~5.1.1",
|
||||||
|
"string_decoder": "~1.1.1",
|
||||||
|
"util-deprecate": "~1.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/concat-stream/node_modules/safe-buffer": {
|
||||||
|
"version": "5.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||||
|
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
||||||
|
},
|
||||||
|
"node_modules/concat-stream/node_modules/string_decoder": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
|
||||||
|
"dependencies": {
|
||||||
|
"safe-buffer": "~5.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/concurrently": {
|
"node_modules/concurrently": {
|
||||||
"version": "8.2.2",
|
"version": "8.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/concurrently/-/concurrently-8.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/concurrently/-/concurrently-8.2.2.tgz",
|
||||||
@@ -8191,8 +8248,7 @@
|
|||||||
"node_modules/core-util-is": {
|
"node_modules/core-util-is": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
|
||||||
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
|
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node_modules/cors": {
|
"node_modules/cors": {
|
||||||
"version": "2.8.5",
|
"version": "2.8.5",
|
||||||
@@ -11335,8 +11391,7 @@
|
|||||||
"node_modules/isarray": {
|
"node_modules/isarray": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
||||||
"integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==",
|
"integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node_modules/isbinaryfile": {
|
"node_modules/isbinaryfile": {
|
||||||
"version": "4.0.10",
|
"version": "4.0.10",
|
||||||
@@ -12735,7 +12790,6 @@
|
|||||||
"version": "1.2.8",
|
"version": "1.2.8",
|
||||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
|
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
|
||||||
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
|
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
|
||||||
"dev": true,
|
|
||||||
"funding": {
|
"funding": {
|
||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
@@ -12955,7 +13009,6 @@
|
|||||||
"version": "0.5.6",
|
"version": "0.5.6",
|
||||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
|
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
|
||||||
"integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
|
"integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"minimist": "^1.2.6"
|
"minimist": "^1.2.6"
|
||||||
},
|
},
|
||||||
@@ -12996,6 +13049,23 @@
|
|||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
||||||
},
|
},
|
||||||
|
"node_modules/multer": {
|
||||||
|
"version": "1.4.5-lts.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/multer/-/multer-1.4.5-lts.1.tgz",
|
||||||
|
"integrity": "sha512-ywPWvcDMeH+z9gQq5qYHCCy+ethsk4goepZ45GLD63fOu0YcNecQxi64nDs3qluZB+murG3/D4dJ7+dGctcCQQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"append-field": "^1.0.0",
|
||||||
|
"busboy": "^1.0.0",
|
||||||
|
"concat-stream": "^1.5.2",
|
||||||
|
"mkdirp": "^0.5.4",
|
||||||
|
"object-assign": "^4.1.1",
|
||||||
|
"type-is": "^1.6.4",
|
||||||
|
"xtend": "^4.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 6.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/multicast-dns": {
|
"node_modules/multicast-dns": {
|
||||||
"version": "7.2.5",
|
"version": "7.2.5",
|
||||||
"resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-7.2.5.tgz",
|
"resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-7.2.5.tgz",
|
||||||
@@ -13565,7 +13635,6 @@
|
|||||||
"version": "4.1.1",
|
"version": "4.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||||
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
|
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
@@ -14397,8 +14466,7 @@
|
|||||||
"node_modules/process-nextick-args": {
|
"node_modules/process-nextick-args": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
|
||||||
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
|
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node_modules/progress": {
|
"node_modules/progress": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
@@ -16085,6 +16153,14 @@
|
|||||||
"node": ">=8.0"
|
"node": ">=8.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/streamsearch": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz",
|
||||||
|
"integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/string_decoder": {
|
"node_modules/string_decoder": {
|
||||||
"version": "1.3.0",
|
"version": "1.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
|
||||||
@@ -16740,6 +16816,11 @@
|
|||||||
"integrity": "sha512-KNNZtayBCtmnNmbo5mG47p1XsCyrx6iVqomjcZnec/1Y5GGARaxPs6r49RnSPeUP3YjNYiU9sQHAtY4BBvnZwg==",
|
"integrity": "sha512-KNNZtayBCtmnNmbo5mG47p1XsCyrx6iVqomjcZnec/1Y5GGARaxPs6r49RnSPeUP3YjNYiU9sQHAtY4BBvnZwg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/typedarray": {
|
||||||
|
"version": "0.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
|
||||||
|
"integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA=="
|
||||||
|
},
|
||||||
"node_modules/typescript": {
|
"node_modules/typescript": {
|
||||||
"version": "5.2.2",
|
"version": "5.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz",
|
||||||
@@ -16937,8 +17018,7 @@
|
|||||||
"node_modules/util-deprecate": {
|
"node_modules/util-deprecate": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||||
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
|
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node_modules/utils-merge": {
|
"node_modules/utils-merge": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
@@ -17981,7 +18061,6 @@
|
|||||||
"version": "4.0.2",
|
"version": "4.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
|
||||||
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
|
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.4"
|
"node": ">=0.4"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
"date-fns": "^3.6.0",
|
"date-fns": "^3.6.0",
|
||||||
"express": "^4.19.2",
|
"express": "^4.19.2",
|
||||||
"flatpickr": "^4.6.13",
|
"flatpickr": "^4.6.13",
|
||||||
|
"multer": "^1.4.5-lts.1",
|
||||||
"mysql2": "^3.9.3",
|
"mysql2": "^3.9.3",
|
||||||
"ngx-bootstrap": "^12.0.0",
|
"ngx-bootstrap": "^12.0.0",
|
||||||
"rxjs": "~7.8.0",
|
"rxjs": "~7.8.0",
|
||||||
|
|||||||
Reference in new issue
Block a user