File tree Expand file tree Collapse file tree 10 files changed +21
-22
lines changed Expand file tree Collapse file tree 10 files changed +21
-22
lines changed Original file line number Diff line number Diff line change 1515 "@stripe/stripe-js" : " ^1.12.1" ,
1616 "@testing-library/jest-dom" : " ^5.11.9" ,
1717 "@testing-library/react" : " ^11.2.5" ,
18- "@testing-library/user-event" : " ^12.6.2 " ,
18+ "@testing-library/user-event" : " ^13.0.1 " ,
1919 "bulma" : " ^0.9.2" ,
2020 "eslint-config-google" : " ^0.14.0" ,
2121 "prop-types" : " ^15.7.2" ,
Original file line number Diff line number Diff line change @@ -38,12 +38,12 @@ const TableRow = (props) => {
3838 }
3939 if ( props . data ) {
4040 return props . data . map ( ( item ) => (
41- < tr key = { `table-row-${ item . uuid } ` } >
42- < td > < a href = { `${ props . prefix } /${ item . uuid } ` } > { item . uuid } </ a > </ td >
41+ < tr key = { `table-row-${ item . id } ` } >
42+ < td > < a href = { `${ props . prefix } /${ item . id } ` } > { item . id } </ a > </ td >
4343 < td > < span > { item . name } </ span > </ td >
4444 < TableCol attrs = { attrs } data = { item } />
4545 < CondCol rif = { item . status } > < StatusBadge status = { item . status } /> </ CondCol >
46- < CondCol rif = { props . action } > < ActionButton action = { props . action } text = { props . actionLabel } url = { `${ props . prefix } /${ item . uuid } ` } /> </ CondCol >
46+ < CondCol rif = { props . action } > < ActionButton action = { props . action } text = { props . actionLabel } url = { `${ props . prefix } /${ item . id } ` } /> </ CondCol >
4747 </ tr >
4848 ) ) ;
4949 } else {
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ const Dashboard = () => {
6161 < div className = "card" >
6262 < div className = "card-header" >
6363 < h3 className = "card-header-title" >
64- Outputs list ({ mediaList ? mediaList . total : '0' } )
64+ Outputs list ({ mediaList ? mediaList . length : '0' } )
6565 </ h3 >
6666 </ div >
6767 < div className = "card-content content" >
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ const FileView = (props) => {
3333 < div className = "card card-content content" >
3434 < div >
3535 < p className = "subtitle is-5 has-text-left" >
36- < label > ID</ label > : < strong > { media ? media . uuid : < span className = "is-loading" > Loading</ span > } </ strong >
36+ < label > ID</ label > : < strong > { media ? media . id : < span className = "is-loading" > Loading</ span > } </ strong >
3737 </ p >
3838 </ div >
3939 < div >
Original file line number Diff line number Diff line change @@ -5,9 +5,8 @@ import {Link} from 'react-router-dom';
55
66const InputList = ( { inputs} ) => {
77 if ( ! inputs ) return ( < option disabled > Loading</ option > ) ;
8-
98 return inputs . map ( ( input , index ) => (
10- < option value = { input . elementName } key = { `${ input . elementName } -${ index } ` } > { input . elementName } </ option >
9+ < option value = { input . id } key = { `${ input . file } -${ index } ` } > { input . file } </ option >
1110 ) ) ;
1211} ;
1312
@@ -73,8 +72,8 @@ const TemplateWizard = (props) => {
7372 const handleFileSubmit = async ( event ) => {
7473 // TODO: create FormData
7574 event . preventDefault ( ) ;
76- await uploadFile ( new FormData ( event . target ) ) ;
77- window . location . href = ' /file/89awefjsdfaksd' ;
75+ const fileResp = await uploadFile ( new FormData ( event . target ) ) ;
76+ window . location . href = ` /file/${ fileResp . id } ` ;
7877 } ;
7978 const uploadFile = async ( req ) => {
8079 if ( ! globalConsumer . token ) {
@@ -134,7 +133,7 @@ const TemplateWizard = (props) => {
134133 </ div >
135134 < fieldset className = "block" >
136135 < legend className = "subtitle is-5" > Choose videos for each view:</ legend >
137- < ViewInputs inputs = { inputs . elements } views = { media . views || [ ] } />
136+ < ViewInputs inputs = { inputs } views = { media . views || [ ] } />
138137 </ fieldset >
139138 < button className = "button is-primary block" type = "submit" > Submit</ button >
140139 </ div >
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ const TemplatesView = () => {
3232 < div className = "card" >
3333 < div className = "card-header" >
3434 < h2 className = "card-header-title" >
35- Templates list ({ mediaList ? mediaList . total : '0' } )
35+ Templates list ({ mediaList ? mediaList . length : '0' } )
3636 </ h2 >
3737 < a className = "button is-info is-rounded" href = "templates/new" title = "Begin Process Wizard" >
3838 New
@@ -60,7 +60,7 @@ const TemplatesView = () => {
6060 </ tr >
6161 </ tfoot >
6262 < tbody >
63- < TableRow prefix = "/templates" action = "/use" actionLabel = "Use" attrs = { attrs } data = { mediaList . elements } />
63+ < TableRow prefix = "/templates" action = "/use" actionLabel = "Use" attrs = { attrs } data = { mediaList } />
6464 </ tbody >
6565 </ table >
6666 </ div >
Original file line number Diff line number Diff line change 1313 "type" : " string" ,
1414 "faker" : " system.fileName"
1515 },
16- "uuid " : {
16+ "id " : {
1717 "type" : " string" ,
1818 "faker" : " random.uuid"
1919 },
3737 "required" : [
3838 " elementType" ,
3939 " elementName" ,
40- " uuid " ,
40+ " id " ,
4141 " creationDate" ,
4242 " updatedDate" ,
4343 " status"
Original file line number Diff line number Diff line change 3535 "type" : " string" ,
3636 "faker" : " date.past"
3737 },
38- "uuid " : {
38+ "id " : {
3939 "type" : " string" ,
4040 "faker" : " random.uuid"
4141 }
4646 " status" ,
4747 " templateId" ,
4848 " updatedDate" ,
49- " uuid "
49+ " id "
5050 ]
5151}
Original file line number Diff line number Diff line change 2828 3840
2929 ]
3030 },
31- "uuid " : {
31+ "id " : {
3232 "type" : " string" ,
3333 "faker" : " random.uuid"
3434 }
3737 " height" ,
3838 " views" ,
3939 " name" ,
40- " uuid "
40+ " id "
4141 ]
4242}
You can’t perform that action at this time.
0 commit comments