Skip to content

Commit

Permalink
[FT] Local PC input
Browse files Browse the repository at this point in the history
  • Loading branch information
NishalJohn committed Mar 29, 2024
1 parent cf93844 commit d264589
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 11 deletions.
46 changes: 43 additions & 3 deletions src/pages/AssetLibrary/AnimationAssetLibraryModal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState } from 'react';
import { Link } from 'react-router-dom';
import { Button, Modal, Form, Input, Slider, Select, Typography, Progress, Radio, Space, Tag, Steps } from 'antd';
import { Button, Modal, Form, Input, Slider, Select, Typography, Cascader, Radio, Space, Tag, Steps } from 'antd';
import { addDoc, collection } from 'firebase/firestore';
import { db } from "../../config/firebase";
import { PlusCircleOutlined, CheckOutlined, UserOutlined, MehOutlined, PlusOutlined } from '@ant-design/icons';
Expand Down Expand Up @@ -49,6 +49,28 @@ export const AnimationAssetLibraryModal = ({ onAddResource }) => {

const { CheckableTag } = Tag;

const PCOwnerOptions = [
{
value: 'buddhika',
label: 'Buddhika',
},
{
value: 'thisara',
label: 'Thisara',

},
{
value: 'chalaka',
label: 'Chalaka',

},
{
value: 'hansaka',
label: 'Hansaka',

},
];

const tagsData = ["Architecture",
"Sci-Fi",
"Realistic",
Expand Down Expand Up @@ -91,6 +113,8 @@ export const AnimationAssetLibraryModal = ({ onAddResource }) => {
'project': values.project,
'assettype': values.assettype,
'assetLink': values.assetUrl,
'localURL': values.localURL,
'pcOwner': values.pcOwner[0],
'dateUpdated': Date.now(),
'pipeline': JSON.stringify(pipelineAssignees),
'tags': selectedTags,
Expand Down Expand Up @@ -300,7 +324,23 @@ export const AnimationAssetLibraryModal = ({ onAddResource }) => {
</Form.Item>



<Form.Item
name="localURL"
label="Local PC Folder Path"
rules={[{ required: true }, { type: 'string', min: 6 }]}
>
<Input
addonBefore={
<Form.Item
name="pcOwner"
style={{ marginBottom: "0px" }}
>
<Cascader placeholder="Owner" options={PCOwnerOptions} style={{ width: 150 }} />
</Form.Item>
}
placeholder="C:\Users\Revox\Documents"
/>
</Form.Item>

{/* //-------------------Tags---------------------- */}
<Text className="m-b-10">Choose Tags</Text>
Expand Down Expand Up @@ -498,7 +538,7 @@ export const AnimationAssetLibraryModal = ({ onAddResource }) => {

{/* Asset Description */}
<Form.Item name="specialnotes" label="Special Notes">
<TextArea showCount maxLength={100} />
<TextArea showCount maxLength={100} />
</Form.Item>

</div>
Expand Down
53 changes: 45 additions & 8 deletions src/pages/AssetLibrary/AssetLibraryModal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState } from 'react';
import { Link } from 'react-router-dom';
import { Button, Modal, Form, Input, Slider, Select, Typography, Progress, Radio, Space, Tag, Steps } from 'antd';
import { Button, Modal, Form, Input, Slider, Select, Typography, Cascader, Radio, Space, Tag, Steps } from 'antd';
import { addDoc, collection } from 'firebase/firestore';
import { db } from "../../config/firebase";
import { PlusCircleOutlined, CheckOutlined, UserOutlined, MehOutlined, PlusOutlined } from '@ant-design/icons';
Expand Down Expand Up @@ -46,6 +46,28 @@ export const AssetLibraryModal = ({ onAddResource }) => {

const { CheckableTag } = Tag;

const PCOwnerOptions = [
{
value: 'buddhika',
label: 'Buddhika',
},
{
value: 'thisara',
label: 'Thisara',

},
{
value: 'chalaka',
label: 'Chalaka',

},
{
value: 'hansaka',
label: 'Hansaka',

},
];

const tagsData = ["Architecture",
"Sci-Fi",
"Realistic",
Expand Down Expand Up @@ -77,10 +99,7 @@ export const AssetLibraryModal = ({ onAddResource }) => {

const onFinish = (values) => {
console.log('Submitting:', values);
console.log('currentProgress:', currentProgress);
console.log('pipelineAssignees:', JSON.stringify(pipelineAssignees));
console.log('tags:', selectedTags);
console.log('client:', currentClient);

onSubmitForm(values);
};
const onFinishFailed = (errorInfo) => {
Expand All @@ -93,6 +112,8 @@ export const AssetLibraryModal = ({ onAddResource }) => {
'project': values.project,
'assettype': values.assettype,
'assetLink': values.assetUrl,
'localURL': values.localURL,
'pcOwner': values.pcOwner[0],
'conceptArtUrl': values.cocneptUrl,
'pipeline': JSON.stringify(pipelineAssignees),
'tags': selectedTags,
Expand Down Expand Up @@ -229,7 +250,7 @@ export const AssetLibraryModal = ({ onAddResource }) => {
initialValues={{
assettype: "Prop",
project: "Internal",
specialnotes:"-"
specialnotes: "-"

}}
>
Expand Down Expand Up @@ -302,7 +323,23 @@ export const AssetLibraryModal = ({ onAddResource }) => {
<Input addonBefore="OneDrive Link" placeholder="Asset Folder URL (Ensure all asset items are in one folder)" />
</Form.Item>


<Form.Item
name="localURL"
label="Local PC Folder Path"
rules={[{ required: true }, { type: 'string', min: 6 }]}
>
<Input
addonBefore={
<Form.Item
name="pcOwner"
style={{ marginBottom: "0px" }}
>
<Cascader placeholder="Owner" options={PCOwnerOptions} style={{ width: 150 }} />
</Form.Item>
}
placeholder="C:\Users\Revox\Documents"
/>
</Form.Item>


{/* //-------------------Tags---------------------- */}
Expand Down Expand Up @@ -503,7 +540,7 @@ export const AssetLibraryModal = ({ onAddResource }) => {


<Form.Item name="specialnotes" label="Special Notes" >
<TextArea maxLength={100}/>
<TextArea maxLength={100} />
</Form.Item>

</div>
Expand Down

0 comments on commit d264589

Please sign in to comment.