This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Fragment } from 'react' | |
| const AddStock = ({ handleAddStock }) => { | |
| const [available, setAvailable] = useState(0) | |
| return ( | |
| <Fragment> | |
| <input | |
| onChange={event => setAvailable(event.target.value)} | |
| value={available} | |
| /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "id": "CD", | |
| "name": "Marx et Compagnie", | |
| "stocks": [ | |
| { "available": 15, "id": "AE" }, | |
| { "available": 25, "id": "BF" }, | |
| ] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from flask import current_app as app, jsonify, request | |
| from models import Offer, PcObject, Stock | |
| @app.route('/offers/<id>', methods=['GET']) | |
| @login_required | |
| def get_offer(id): | |
| offer = load_or_404(Offer, id) | |
| return jsonify(offer._asdict(include=["stocks"])) | |
| @app.route('/stocks', methods=['POST']) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Offer extends Component { | |
| constructor() { | |
| super(); | |
| this.state = { | |
| available: 0 | |
| }; | |
| } | |
| componentDidMount() { | |
| this.props.requestGetOffer(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Projet de loi pour une République numérique | |
| TITRE IER | |
| LA CIRCULATION DES DONNEES ET DU SAVOIR | |
| CHAPITRE IER | |
| ECONOMIE DE LA DONNEE | |
| Section 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Projet de loi pour une République numérique | |
| TITRE IER | |
| LA CIRCULATION DES DONNEES ET DU SAVOIR | |
| CHAPITRE IER | |
| ECONOMIE DE LA DONNEE | |
| Section 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .clement { | |
| color:red; | |
| } |
NewerOlder