itembox images et cache

This commit is contained in:
Simon CATANESE 2024-05-09 18:39:06 +02:00
parent 83291c246b
commit 6602bfd408
11 changed files with 275 additions and 176 deletions

Binary file not shown.

View File

@ -3,57 +3,53 @@
"WorkspaceRootPath": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\components\\nav\\Navbar.jsx||{14D17961-FE51-464D-9111-C4AF11D7D99A}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:src\\components\\nav\\Navbar.jsx||{14D17961-FE51-464D-9111-C4AF11D7D99A}"
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Admin\\Source\\Repos\\2024-DEV-BUT3\\src\\api\\image-request.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:src\\api\\image-request.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\components\\app-layout.jsx||{14D17961-FE51-464D-9111-C4AF11D7D99A}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:src\\components\\app-layout.jsx||{14D17961-FE51-464D-9111-C4AF11D7D99A}"
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\components\\item\\RoomItemsList.jsx||{14D17961-FE51-464D-9111-C4AF11D7D99A}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:src\\components\\item\\RoomItemsList.jsx||{14D17961-FE51-464D-9111-C4AF11D7D99A}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\contexts\\auth-context.jsx||{14D17961-FE51-464D-9111-C4AF11D7D99A}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:src\\contexts\\auth-context.jsx||{14D17961-FE51-464D-9111-C4AF11D7D99A}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\components\\authenticated.jsx||{14D17961-FE51-464D-9111-C4AF11D7D99A}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:src\\components\\authenticated.jsx||{14D17961-FE51-464D-9111-C4AF11D7D99A}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\api\\authentication.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:src\\api\\authentication.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\App.jsx||{14D17961-FE51-464D-9111-C4AF11D7D99A}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:src\\App.jsx||{14D17961-FE51-464D-9111-C4AF11D7D99A}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\pages\\test.jsx||{14D17961-FE51-464D-9111-C4AF11D7D99A}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:src\\pages\\test.jsx||{14D17961-FE51-464D-9111-C4AF11D7D99A}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\api\\room.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:src\\api\\room.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\.vs\\2024-DEV-BUT3\\config\\applicationhost.config||{FA3CD31E-987B-443A-9B81-186104E8DAC1}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:.vs\\2024-DEV-BUT3\\config\\applicationhost.config||{FA3CD31E-987B-443A-9B81-186104E8DAC1}"
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\components\\item\\ItemBox.jsx||{14D17961-FE51-464D-9111-C4AF11D7D99A}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:src\\components\\item\\ItemBox.jsx||{14D17961-FE51-464D-9111-C4AF11D7D99A}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\components\\item\\ItemPage.jsx||{14D17961-FE51-464D-9111-C4AF11D7D99A}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:src\\components\\item\\ItemPage.jsx||{14D17961-FE51-464D-9111-C4AF11D7D99A}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\api\\index.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:src\\api\\index.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\components\\app-layout.jsx||{14D17961-FE51-464D-9111-C4AF11D7D99A}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:src\\components\\app-layout.jsx||{14D17961-FE51-464D-9111-C4AF11D7D99A}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\main.jsx||{14D17961-FE51-464D-9111-C4AF11D7D99A}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:src\\main.jsx||{14D17961-FE51-464D-9111-C4AF11D7D99A}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\App.jsx||{14D17961-FE51-464D-9111-C4AF11D7D99A}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:src\\App.jsx||{14D17961-FE51-464D-9111-C4AF11D7D99A}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\components\\nav\\Navbar.jsx||{14D17961-FE51-464D-9111-C4AF11D7D99A}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:src\\components\\nav\\Navbar.jsx||{14D17961-FE51-464D-9111-C4AF11D7D99A}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\api\\room.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:src\\api\\room.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\pages\\test.jsx||{14D17961-FE51-464D-9111-C4AF11D7D99A}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:src\\pages\\test.jsx||{14D17961-FE51-464D-9111-C4AF11D7D99A}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\package.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:package.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\vitest.config.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:vitest.config.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\vite.config.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:vite.config.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Admin\\Source\\Repos\\2024-DEV-BUT3\\src\\hooks\\page-title-context.jsx||{14D17961-FE51-464D-9111-C4AF11D7D99A}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:src\\hooks\\page-title-context.jsx||{14D17961-FE51-464D-9111-C4AF11D7D99A}"
@ -68,128 +64,89 @@
"DockedWidth": 200,
"SelectedChildIndex": 3,
"Children": [
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "auth-context.jsx",
"DocumentMoniker": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\contexts\\auth-context.jsx",
"RelativeDocumentMoniker": "src\\contexts\\auth-context.jsx",
"ToolTip": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\contexts\\auth-context.jsx",
"RelativeToolTip": "src\\contexts\\auth-context.jsx",
"ViewState": "AQIAACoAAAAAAAAAAAAAADwAAAAEAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003663|",
"WhenOpened": "2024-05-07T09:38:35.04Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 3,
"Title": "authenticated.jsx",
"DocumentMoniker": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\components\\authenticated.jsx",
"RelativeDocumentMoniker": "src\\components\\authenticated.jsx",
"ToolTip": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\components\\authenticated.jsx",
"RelativeToolTip": "src\\components\\authenticated.jsx",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003663|",
"WhenOpened": "2024-05-07T09:38:15.52Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 4,
"Title": "authentication.js",
"DocumentMoniker": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\api\\authentication.js",
"RelativeDocumentMoniker": "src\\api\\authentication.js",
"ToolTip": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\api\\authentication.js",
"RelativeToolTip": "src\\api\\authentication.js",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAB0AAAACAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001646|",
"WhenOpened": "2024-05-07T09:34:33.928Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "Navbar.jsx",
"DocumentMoniker": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\components\\nav\\Navbar.jsx",
"RelativeDocumentMoniker": "src\\components\\nav\\Navbar.jsx",
"ToolTip": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\components\\nav\\Navbar.jsx",
"RelativeToolTip": "src\\components\\nav\\Navbar.jsx",
"ViewState": "AQIAAAsAAAAAAAAAAAAQwBIAAAAgAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003663|",
"WhenOpened": "2024-05-06T21:42:24.983Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "app-layout.jsx",
"DocumentMoniker": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\components\\app-layout.jsx",
"RelativeDocumentMoniker": "src\\components\\app-layout.jsx",
"ToolTip": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\components\\app-layout.jsx",
"RelativeToolTip": "src\\components\\app-layout.jsx",
"ViewState": "AQIAAAAAAAAAAAAAAAAAABAAAAAUAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003663|",
"WhenOpened": "2024-05-07T08:58:37.766Z",
"EditorCaption": ""
},
{
"$type": "Bookmark",
"Name": "ST:1:0:{d212f56b-c48a-434c-a121-1c5d80b59b9f}"
},
{
"$type": "Document",
"DocumentIndex": 8,
"Title": "applicationhost.config",
"DocumentMoniker": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\.vs\\2024-DEV-BUT3\\config\\applicationhost.config",
"RelativeDocumentMoniker": ".vs\\2024-DEV-BUT3\\config\\applicationhost.config",
"ToolTip": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\.vs\\2024-DEV-BUT3\\config\\applicationhost.config",
"RelativeToolTip": ".vs\\2024-DEV-BUT3\\config\\applicationhost.config",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000601|",
"WhenOpened": "2024-05-06T23:30:27.125Z",
"DocumentIndex": 1,
"Title": "RoomItemsList.jsx",
"DocumentMoniker": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\components\\item\\RoomItemsList.jsx",
"RelativeDocumentMoniker": "src\\components\\item\\RoomItemsList.jsx",
"ToolTip": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\components\\item\\RoomItemsList.jsx",
"RelativeToolTip": "src\\components\\item\\RoomItemsList.jsx",
"ViewState": "AQIAAAAAAAAAAAAAAAAAABwAAABiAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003663|",
"WhenOpened": "2024-05-09T12:04:41.785Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 11,
"Title": "vitest.config.js",
"DocumentMoniker": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\vitest.config.js",
"RelativeDocumentMoniker": "vitest.config.js",
"ToolTip": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\vitest.config.js",
"RelativeToolTip": "vitest.config.js",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"DocumentIndex": 4,
"Title": "index.js",
"DocumentMoniker": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\api\\index.js",
"RelativeDocumentMoniker": "src\\api\\index.js",
"ToolTip": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\api\\index.js",
"RelativeToolTip": "src\\api\\index.js",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAIAAAAeAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001646|",
"WhenOpened": "2024-05-06T23:20:08.112Z"
"WhenOpened": "2024-05-09T12:03:27.48Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 12,
"Title": "vite.config.js",
"DocumentMoniker": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\vite.config.js",
"RelativeDocumentMoniker": "vite.config.js",
"ToolTip": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\vite.config.js",
"RelativeToolTip": "vite.config.js",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"DocumentIndex": 0,
"Title": "image-request.js",
"DocumentMoniker": "C:\\Users\\Admin\\Source\\Repos\\2024-DEV-BUT3\\src\\api\\image-request.js",
"RelativeDocumentMoniker": "src\\api\\image-request.js",
"ToolTip": "C:\\Users\\Admin\\Source\\Repos\\2024-DEV-BUT3\\src\\api\\image-request.js",
"RelativeToolTip": "src\\api\\image-request.js",
"ViewState": "AQIAAAAAAAAAAAAAAAAAABEAAAAAAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001646|",
"WhenOpened": "2024-05-06T23:20:02.873Z"
"WhenOpened": "2024-05-09T11:59:29.915Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 7,
"DocumentIndex": 5,
"Title": "app-layout.jsx",
"DocumentMoniker": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\components\\app-layout.jsx",
"RelativeDocumentMoniker": "src\\components\\app-layout.jsx",
"ToolTip": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\components\\app-layout.jsx",
"RelativeToolTip": "src\\components\\app-layout.jsx",
"ViewState": "AQIAAAAAAAAAAAAAAAAAACYAAAAcAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003663|",
"WhenOpened": "2024-05-07T10:59:39.423Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 8,
"Title": "Navbar.jsx",
"DocumentMoniker": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\components\\nav\\Navbar.jsx",
"RelativeDocumentMoniker": "src\\components\\nav\\Navbar.jsx",
"ToolTip": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\components\\nav\\Navbar.jsx",
"RelativeToolTip": "src\\components\\nav\\Navbar.jsx",
"ViewState": "AQIAADUAAAAAAAAAAAAQwFAAAAAVAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003663|",
"WhenOpened": "2024-05-07T10:56:14.054Z"
},
{
"$type": "Document",
"DocumentIndex": 9,
"Title": "room.js",
"DocumentMoniker": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\api\\room.js",
"RelativeDocumentMoniker": "src\\api\\room.js",
"ToolTip": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\api\\room.js",
"RelativeToolTip": "src\\api\\room.js",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAA4AAAAAAAAA",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAkAAAASAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001646|",
"WhenOpened": "2024-05-06T22:06:47.739Z",
"EditorCaption": ""
"WhenOpened": "2024-05-06T22:06:47.739Z"
},
{
"$type": "Document",
"DocumentIndex": 6,
"DocumentIndex": 10,
"Title": "test.jsx",
"DocumentMoniker": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\pages\\test.jsx",
"RelativeDocumentMoniker": "src\\pages\\test.jsx",
@ -197,25 +154,48 @@
"RelativeToolTip": "src\\pages\\test.jsx",
"ViewState": "AQIAAAAAAAAAAAAAAAAAABMAAAACAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003663|",
"WhenOpened": "2024-05-06T18:36:04.359Z",
"WhenOpened": "2024-05-06T18:36:04.359Z"
},
{
"$type": "Document",
"DocumentIndex": 3,
"Title": "ItemPage.jsx",
"DocumentMoniker": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\components\\item\\ItemPage.jsx",
"RelativeDocumentMoniker": "src\\components\\item\\ItemPage.jsx",
"ToolTip": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\components\\item\\ItemPage.jsx",
"RelativeToolTip": "src\\components\\item\\ItemPage.jsx",
"ViewState": "AQIAABIAAAAAAAAAAAAAACkAAAAXAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003663|",
"WhenOpened": "2024-05-06T18:36:16.712Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 5,
"DocumentIndex": 6,
"Title": "main.jsx",
"DocumentMoniker": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\main.jsx",
"RelativeDocumentMoniker": "src\\main.jsx",
"ToolTip": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\main.jsx",
"RelativeToolTip": "src\\main.jsx",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAwAAAAAAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003663|",
"WhenOpened": "2024-05-07T11:03:34.632Z"
},
{
"$type": "Document",
"DocumentIndex": 7,
"Title": "App.jsx",
"DocumentMoniker": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\App.jsx",
"RelativeDocumentMoniker": "src\\App.jsx",
"ToolTip": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\App.jsx",
"RelativeToolTip": "src\\App.jsx",
"ViewState": "AQIAAAAAAAAAAAAAAAAAABEAAAAAAAAA",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAA4AAAAAAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003663|",
"WhenOpened": "2024-05-06T16:40:31.952Z",
"EditorCaption": ""
"WhenOpened": "2024-05-06T16:40:31.952Z"
},
{
"$type": "Document",
"DocumentIndex": 10,
"DocumentIndex": 11,
"Title": "package.json",
"DocumentMoniker": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\package.json",
"RelativeDocumentMoniker": "package.json",
@ -227,7 +207,7 @@
},
{
"$type": "Document",
"DocumentIndex": 13,
"DocumentIndex": 12,
"Title": "page-title-context.jsx",
"DocumentMoniker": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\hooks\\page-title-context.jsx",
"RelativeDocumentMoniker": "src\\hooks\\page-title-context.jsx",
@ -236,18 +216,25 @@
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAgAAAAMAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003663|",
"WhenOpened": "2024-05-06T19:10:02.382Z"
},
}
]
},
{
"DockedWidth": 200,
"SelectedChildIndex": 0,
"Children": [
{
"$type": "Document",
"DocumentIndex": 9,
"Title": "ItemPage.jsx",
"DocumentMoniker": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\components\\item\\ItemPage.jsx",
"RelativeDocumentMoniker": "src\\components\\item\\ItemPage.jsx",
"ToolTip": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\components\\item\\ItemPage.jsx",
"RelativeToolTip": "src\\components\\item\\ItemPage.jsx",
"ViewState": "AQIAAAAAAAAAAAAAAAAAACQAAAApAAAA",
"DocumentIndex": 2,
"Title": "ItemBox.jsx",
"DocumentMoniker": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\components\\item\\ItemBox.jsx",
"RelativeDocumentMoniker": "src\\components\\item\\ItemBox.jsx",
"ToolTip": "C:\\Users\\Admin\\source\\repos\\2024-DEV-BUT3\\src\\components\\item\\ItemBox.jsx",
"RelativeToolTip": "src\\components\\item\\ItemBox.jsx",
"ViewState": "AQIAAAAAAAAAAAAAAAAAABwAAAA7AAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003663|",
"WhenOpened": "2024-05-06T18:36:16.712Z"
"WhenOpened": "2024-05-09T12:03:58.04Z",
"EditorCaption": ""
}
]
}

View File

@ -1,8 +1,16 @@
{
"ExpandedNodes": [
"",
"\\src\\assets\\styles"
"\\src",
"\\src\\api",
"\\src\\components",
"\\src\\components\\form",
"\\src\\components\\item",
"\\src\\components\\nav",
"\\src\\contexts",
"\\src\\pages",
"\\src\\pages\\authenticated"
],
"SelectedNode": "\\package.json",
"SelectedNode": "\\src\\main.jsx",
"PreviewInSolutionExplorer": false
}

Binary file not shown.

24
src/api/image-request.js Normal file
View File

@ -0,0 +1,24 @@
const API_KEY = 'AIzaSyA_w7wmOAibpiDF5H3mXuL9AhcN-KVkFg4';
const CSE_ID = '611cd62b5f315445c';
export async function searchAndResizeImage(query) {
try {
const response = await fetch(`https://www.googleapis.com/customsearch/v1?key=${API_KEY}&cx=${CSE_ID}&q=${query}&searchType=image&num=1&imgSize=medium`);
const data = await response.json();
if (data.items && data.items.length > 0) {
const imageUrl = data.items[0].link;
console.log('Image URL:', imageUrl);
return imageUrl;
} else {
console.error('No image found.');
return "";
}
} catch (error) {
console.error('Error fetching image:', error);
return "";
}
}

View File

@ -1,2 +1,3 @@
export * from './authentication'
export * from './user'
export * from './image-request'

View File

@ -1,12 +1,43 @@
import React from 'react';
import React, { useEffect, useState } from 'react';
import { searchAndResizeImage } from '../../api/image-request'
// Composant Image atomique
const Image = ({ src, alt }) => {
return <img src={src} alt={alt} style={{ display: 'block', margin: 'auto' }} />;
// Composant Image
const Image = ({ src, alt, request, _id }) => {
const [cacheUrl, setCacheUrl] = useState(null);
useEffect(() => {
const fetchData = async () => {
let cachedUrl = localStorage.getItem(_id);
if (!cachedUrl) {
try {
cachedUrl = await searchAndResizeImage(request);
localStorage.setItem(_id, cachedUrl);
console.log("Mise en cache de l'image avec l'ID : " + _id);
} catch (error) {
console.error("Erreur lors de la récupération de l'image : ", error);
}
}
setCacheUrl(cachedUrl);
};
fetchData();
}, [request, _id]);
if (src) {
return <img src={src} alt={alt} style={{ display: 'block', margin: 'auto' }} width='150px' height='150px' />;
} else if (cacheUrl) {
return <img src={cacheUrl} alt={alt} style={{ display: 'block', margin: 'auto' }} width='150px' height='150px' />;
} else {
return <img src={"https://media.discordapp.net/attachments/1164176196930637956/1167746303820840990/IMG_20231028_104620.jpg?ex=663ddefe&is=663c8d7e&hm=0985ce123fd1751f65388f7fefde5db6ce817e514e30f1d3c81eb28b15e78453&=&"} alt={alt} style={{ display: 'block', margin: 'auto' }} width='150px' height='150px' />;
}
};
// Composant Description atomique
// Composant Description
const Description = ({ title, children }) => {
if (title.length >= 30) {
title = title.slice(0, 22 - 3) + '...';
}
return (
<div className="description">
<h2>{title}</h2>
@ -15,8 +46,9 @@ const Description = ({ title, children }) => {
);
};
// Composant Caractéristique atomique
// Composant Caractéristique
const Characteristic = ({ label, value }) => {
return (
<div className="characteristic">
<strong>{label}:</strong> {value}
@ -24,18 +56,25 @@ const Characteristic = ({ label, value }) => {
);
};
// Composant Détails du Produit (combinaison atomique)
export const ItemBox = ({ imageUrl, model, brand, purchaseDate, price, onEdit }) => {
return (
<div className="product-details">
<Image src={imageUrl} alt="Product" />
<Description title="Product Information">
<Characteristic label="Model" value={model} />
<Characteristic label="Brand" value={brand} />
<Characteristic label="Purchase Date" value={purchaseDate} />
<Characteristic label="Price" value={price} />
</Description>
<button onClick={onEdit}>Edit</button>
</div>
);
// Composant Détails du Produit
export const ItemBox = ({ model, brand, purchaseDate, price, onEdit, _id }) => {
let productname = brand + " " + model;
let formatedPrice = price + "€";
let formatedDate = new Date(purchaseDate).toLocaleDateString('fr-FR');
let request = brand + " " + model
return (
<div className="product-details" >
<Description title={productname} >
<Image request={request} _id={_id} alt="Product" />
<Characteristic label="Model" value={model} />
<Characteristic label="Brand" value={brand} />
<Characteristic label="Purchase Date" value={formatedDate} />
<Characteristic label="Price" value={formatedPrice} />
</Description>
<button onClick={onEdit}>Edit</button>
</div>
);
};

View File

@ -3,6 +3,7 @@ import axios from 'axios'; // Assurez-vous que le chemin d'importation soit corr
import { ItemBox } from './ItemBox';
import { Space, DatePicker, Row, Col, Select, Input, InputNumber } from 'antd';
const { RangePicker } = DatePicker;
const { Option } = Select;
@ -36,9 +37,21 @@ export const ItemPage = () => {
try {
const response = await axios.get(
`${import.meta.env.VITE_API_URL}/item`,
);
);
//await response.data.forEach(async (item) => {
// let cacheUrl = localStorage.getItem(item._id);
// if (cacheUrl == null || cacheUrl == "") {
// let request = item.brand + " " + item.model
// cacheUrl = await searchAndResizeImage(request)
// await localStorage.setItem(item._id, cacheUrl)
// console.log("mise en cache "+ item.imageUrl)
// }
// item.imageUrl = cacheUrl;
//})
setItems(response.data);
} catch (error) {
}
catch (error) {
console.error(error);
}
};
@ -144,3 +157,6 @@ export const ItemPage = () => {
</div>
);
};

View File

@ -26,7 +26,6 @@ export const RoomItemsList = () => {
console.error(error);
}
};
fetchRoomsAndItems();
}, []);

View File

@ -12,11 +12,11 @@ setupAxios();
ReactDOM.createRoot(document.getElementById("root")).render(
<React.StrictMode>
//<React.StrictMode>
<BrowserRouter>
<CookiesProvider>
<App/>
</CookiesProvider>
</BrowserRouter>
</React.StrictMode>,
//</React.StrictMode>,
);

25
src/pages/rooms-stats.jsx Normal file
View File

@ -0,0 +1,25 @@
import React, { useEffect } from 'react';
import { useAuth } from "../hooks";
import { ItemPage } from "../components/item/ItemPage";
import { usePageTitle } from '../hooks/page-title-context';
export const RoomsStats = () => {
const { user } = useAuth();
const { setPageTitle } = usePageTitle();
// Mettre à jour le titre de la page dans le contexte
useEffect(() => {
setPageTitle("Toutes les rooms :");
}, [setPageTitle]);
useEffect(() => {
setPageTitle("Toutes les rooms :");
}, [setPageTitle]);
return (
<div>
</div>
);
};