Skip to content
Snippets Groups Projects
Select Git revision
  • 54c4c0e83d3051a5be3d5622cc98f3c989b19a4a
  • master default
  • clement
  • fix_requirements
  • new_signup
  • interface_admin
  • hamza
  • dev
  • test
  • melissa
  • context_sheet
  • sorties_new
  • Seon82-patch-2
  • export_bdd
  • refactor/participation-user-link
15 results

models.py

Blame
  • ToucanLine.js 1.39 KiB
    import React, {Component} from 'react'
    import {Table, Image, Button} from 'semantic-ui-react'
    
    class ToucanLine extends Component {
        mois = ["janvier", "février", "mars", "avril", "mai", "juin","juillet","août","septembre","octobre","novembre","décembre"]
        date(time){
            const dateObject = new Date(time)
            const year = dateObject.getFullYear();
            const month = dateObject.getMonth();
            const day = dateObject.getDay();
            return (`${day+1}/${month+1}/${year}`)
        }
    
        render(){
            return (
                <Table.Row>
                    <Table.Cell >
                        {console.log(this.props.toucan["_id"])}
                        <a href={`http://localhost:8000/toucan/pdf/${this.props.toucan["_id"]}`}>
                        <img
                        src={`/toucan/img/${this.props.toucan["_id"]}`}
                        style={{width: "50px"}}
                        alt="cover"
                        />
                        </a>
                    </Table.Cell>
                    <Table.Cell  >
                        {this.props.toucan.title}
                    </Table.Cell>
                    <Table.Cell  >
                        {this.date(this.props.toucan.date)}
                    </Table.Cell>
                    <Table.Cell style={{width:"fit-content"}}>
                        <Button negative icon="cancel"/>
                    </Table.Cell>
                </Table.Row>
            )
        }
    }
    
    export default ToucanLine