some stuff idk what is it😂

This commit is contained in:
Just-Simon-Dev committed 2023-05-27 04:00:16 +02:00
1 parent 9216dd0726
commit 972b7f292c
6 files changed
+65 -5

No files matched your search

@@ -24,6 +24,12 @@ const initialState: IssueState = {
photos: [],
status: 'new',
type: 'problem',
solution: {
comments: [],
createdAt: new Date(),
description: "eoooo",
title: "title"
},
comments: [],
},
{
@@ -1,5 +1,7 @@
import { createFeatureSelector, createSelector } from '@ngrx/store';
import { IssueState } from '../state/issue.state';
import { SolutionModel } from 'src/app/models/solution.model';
import { IssueModel } from 'src/app/models/issue.model';
const selectIssueFeatureState = createFeatureSelector<IssueState>('issueState');
@@ -12,3 +14,5 @@ export const selectIssue = (id: string) =>
createSelector(selectAllIssues, (issues) =>
issues.find((issue) => issue.id === id)
);
export const selectAllSolutions = createSelector<any, IssueModel[], SolutionModel[]>(selectAllIssues, issues => issues.map(issue => issue.solution).filter(solution => solution !== undefined) as SolutionModel[])