diff --git a/src/pages/AssetLibrary/AssetLibrary.js b/src/pages/AssetLibrary/AssetLibrary.js index dfc7515..c0a6a4e 100644 --- a/src/pages/AssetLibrary/AssetLibrary.js +++ b/src/pages/AssetLibrary/AssetLibrary.js @@ -2,11 +2,12 @@ import React, { useState, useEffect } from 'react'; import { AssetLibraryModal } from "./AssetLibraryModal" import { MarketplaceAssetLibraryModal } from "./MarketplaceAssetLibraryModal" import { AnimationAssetLibraryModal } from "./AnimationAssetLibraryModal" -import { Typography, Tag, Button, Input } from 'antd'; -import { LinkOutlined, CheckCircleOutlined, DollarOutlined, HddOutlined } from '@ant-design/icons'; +import { Typography, Button, Input } from 'antd'; +import { LinkOutlined, CheckCircleOutlined, DollarOutlined, DeleteOutlined, FolderOpenOutlined, EditOutlined } from '@ant-design/icons'; import { db, auth } from "../../config/firebase"; import { getDocs, collection } from 'firebase/firestore' import { Navigate } from 'react-router-dom'; +import { sort } from 'fast-sort'; const { Title, Text } = Typography; const { Search } = Input; @@ -22,12 +23,16 @@ export const AssetLibrary = () => { const filterAllData = (allRefData) => { + allRefData.forEach(list => { list.forEach(asset => { setAssetData(allAssetData => [...allAssetData, asset]); setSearchData(assetSearchData => [...assetSearchData, asset]); }); }); + // let sortedFilteredData = sort(assetSearchData).desc(u => u["date-updated"]) + setSearchData(assetSearchData => sort(assetSearchData).desc(u => u["date-updated"])); + } @@ -157,9 +162,6 @@ export const AssetLibrary = () => { <> {asset.group == "Market" ? (
-
- {/* */} -
{asset.assetName} @@ -185,15 +187,13 @@ export const AssetLibrary = () => { ))}
*/}
- - + + +
) : asset.group == "Animation" ? (
-
- {/* */} -
@@ -206,8 +206,8 @@ export const AssetLibrary = () => {
Animation
- {asset.currentProgress.step} - {asset.currentProgress.assignee} + {asset.currentProgress?.step} + {asset.currentProgress?.assignee}
@@ -223,48 +223,43 @@ export const AssetLibrary = () => { ))}
*/}
- - + + +
- ) : ( -
-
- {/* */} -
-
-
- - {asset.assetName} - - + ) + : ( +
+
+ + {asset.assettype}
- {asset.assettype} -
-
- 3D Model -
- {asset.currentProgress.step} - {asset.currentProgress.assignee} +
+ 3D Model +
+ {asset.currentProgress?.step} + {asset.currentProgress?.assignee} +
+
+
+ {asset.project} + {asset.client} +
+ +
+ + +
-
- {asset.project} - {asset.client} -
- {/*
- {asset.tags.map((tag) => ( - - {tag} - - ))} -
*/} -
- - -
-
- )} + ) + } ))}
diff --git a/src/pages/AssetLibrary/MarketplaceAssetLibraryModal.js b/src/pages/AssetLibrary/MarketplaceAssetLibraryModal.js index 2db332a..5867322 100644 --- a/src/pages/AssetLibrary/MarketplaceAssetLibraryModal.js +++ b/src/pages/AssetLibrary/MarketplaceAssetLibraryModal.js @@ -39,7 +39,6 @@ export const MarketplaceAssetLibraryModal = ({ onAddResource }) => { const tagsData = ["Architecture", "System", "Sci-Fi", - "Sci-Fi", "Realistic", "Low-Poly", "Modern", @@ -79,7 +78,7 @@ export const MarketplaceAssetLibraryModal = ({ onAddResource }) => { try { await addDoc(resourceListRef, { 'assetName': values.assetName, - 'description': values.description, + 'project': values.project, 'assettype': values.assettype, 'source': values.source, 'assetLink': values.assetURL, @@ -103,11 +102,29 @@ export const MarketplaceAssetLibraryModal = ({ onAddResource }) => { //-------------- - const onDescriptionorSpecialNotesAdd = (e) => { - // console.log('Change:', e.target.value); - }; - + const onProjectChange = (e) => { + switch (e) { + case "Internal": + setCurrentClient("Revox") + break; + case "Spiral": + setCurrentClient("Revox") + break; + case "Starwalker": + setCurrentClient("Marius") + break; + case "Goodness Game": + setCurrentClient("Foundation of Goodness") + break; + case "Other": + setCurrentClient("Unknown") + break; + default: + setCurrentClient("Unknown") + break; + } + }; //---------------------- @@ -178,7 +195,8 @@ export const MarketplaceAssetLibraryModal = ({ onAddResource }) => { assettype: "Prop", source: "epic", project: "Internal", - assetCategory: "3D Animation" + assetCategory: "3D Animation", + specialnotes:"-" }} >
@@ -197,11 +215,20 @@ export const MarketplaceAssetLibraryModal = ({ onAddResource }) => { - {/* Asset Description */} - -