Commit 3f032315 authored by Mohammad Javad Ghasemy's avatar Mohammad Javad Ghasemy 🦈

first production

parent 89fc18cf
......@@ -17,10 +17,11 @@ class SearchBookByIsbn extends Controller
*/
public function __invoke($_ISBN)
{
$ketabir = new Ketabir();
$book_picture = $ketabir->get_book_picture_by_isbn($_ISBN);
$opac_nlai = new OpacNlai();
$book_detail = $opac_nlai->get_book_detail($_ISBN);
$ketabir = new Ketabir($_ISBN);
$book_picture = $ketabir->book_picture;
$book_detail = $ketabir->book_detail;
// $opac_nlai = new OpacNlai();
// $book_detail = $opac_nlai->get_book_detail($_ISBN);
return [
"ok" => true,
"picture" => $book_picture,
......
......@@ -512,12 +512,12 @@
"source": {
"type": "git",
"url": "https://gitlab.com/kmtqom/search-book-by-isbn.git",
"reference": "1ae3d6a0994e55d58db2d59ecc51c4c145fd715a"
"reference": "d1d545a08f25df02747ed3b05a4f9cc7966ba172"
},
"dist": {
"type": "zip",
"url": "https://gitlab.com/api/v4/projects/kmtqom%2Fsearch-book-by-isbn/repository/archive.zip?sha=1ae3d6a0994e55d58db2d59ecc51c4c145fd715a",
"reference": "1ae3d6a0994e55d58db2d59ecc51c4c145fd715a",
"url": "https://gitlab.com/api/v4/projects/kmtqom%2Fsearch-book-by-isbn/repository/archive.zip?sha=d1d545a08f25df02747ed3b05a4f9cc7966ba172",
"reference": "d1d545a08f25df02747ed3b05a4f9cc7966ba172",
"shasum": ""
},
"require": {
......@@ -542,7 +542,7 @@
}
],
"description": "get book information by ISBN. powerd by nlai and book.ir",
"time": "2020-05-04T09:17:35+00:00"
"time": "2020-05-04T12:29:24+00:00"
},
{
"name": "guzzlehttp/guzzle",
......
This diff is collapsed.
This diff is collapsed.
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
/*!
* Bootstrap v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
/*!
* Sizzle CSS Selector Engine v2.3.5
* https://sizzlejs.com/
*
* Copyright JS Foundation and other contributors
* Released under the MIT license
* https://js.foundation/
*
* Date: 2020-03-14
*/
/*!
* jQuery JavaScript Library v3.5.0
* https://jquery.com/
*
* Includes Sizzle.js
* https://sizzlejs.com/
*
* Copyright JS Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2020-04-10T15:07Z
*/
/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
/** @license React v0.19.1
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v16.13.1
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v16.13.1
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**!
* @fileOverview Kickass library to create and place poppers near their reference elements.
* @version 1.16.1
* @license
* Copyright (c) 2016 Federico Zivolo and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
......@@ -21,7 +21,7 @@ export default class BookDetail extends React.Component {
<Row>
<img src={this.props.book.picture} />
</Row>
{
{/* {
(typeof this.props.book.detail === typeof []) ?
this.props.book.detail.map((element, i) => {
<Row key={i}>
......@@ -40,7 +40,7 @@ export default class BookDetail extends React.Component {
{console.log(this.props.book.detail)}
<h1>HI</h1>
</center>
}
} */}
</div>
);
}
......
......@@ -18,7 +18,6 @@ export default class NewBook extends React.Component {
},
isbn: "",
checkStatus: false,
disableSubmit: true
};
this.onIsbnChange = this.onIsbnChange.bind(this);
this.onCheck = this.onCheck.bind(this);
......@@ -46,7 +45,7 @@ export default class NewBook extends React.Component {
.then(book => {
console.log("there");
if (typeof book.ok === typeof true && book.ok === true)
this.setState({ book: book, disableSubmit: false });
this.setState({ book: book, checkStatus: true });
else
console.log(book);
})
......@@ -55,6 +54,7 @@ export default class NewBook extends React.Component {
onSubmit(e) {
console.log("HERE");
if (!this.state.checkStatus)
return null;
fetch('api/books/', {
......@@ -77,7 +77,14 @@ export default class NewBook extends React.Component {
onReset(e) {
this.setState({ isbn: "" });
this.setState({
book: {
picture: "",
detail: []
},
isbn: "",
checkStatus: false,
});
}
......@@ -104,7 +111,7 @@ export default class NewBook extends React.Component {
</Form.Item>
<Form.Item >
<Button onClick={this.onCheck} type="primary">Cehck</Button>&nbsp;
<Button onClick={this.onSubmit} type="primary" disabled={this.state.disableSubmit}>Submit</Button>&nbsp;
<Button onClick={this.onSubmit} type="primary" >Submit</Button>&nbsp;
<Button onClick={this.onReset} type="danger">Refresh</Button>
</Form.Item>
</Form>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment