Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
L
library
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kanoon meysam tamar
library
Commits
3f032315
Commit
3f032315
authored
May 05, 2020
by
Mohammad Javad Ghasemy
🦈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first production
parent
89fc18cf
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
138 additions
and
80948 deletions
+138
-80948
app/Http/Controllers/API/SearchBookByIsbn.php
app/Http/Controllers/API/SearchBookByIsbn.php
+5
-4
composer.lock
composer.lock
+4
-4
public/css/app.css
public/css/app.css
+2
-10878
public/js/app.js
public/js/app.js
+2
-70056
public/js/app.js.LICENSE.txt
public/js/app.js.LICENSE.txt
+112
-0
resources/js/components/NewBook/BookDetail.js
resources/js/components/NewBook/BookDetail.js
+2
-2
resources/js/components/Newbook.js
resources/js/components/Newbook.js
+11
-4
No files found.
app/Http/Controllers/API/SearchBookByIsbn.php
View file @
3f032315
...
...
@@ -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
,
...
...
composer.lock
View file @
3f032315
...
...
@@ -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-04T
09:17:35
+00:00"
"time": "2020-05-04T
12:29:24
+00:00"
},
{
"name": "guzzlehttp/guzzle",
...
...
public/css/app.css
View file @
3f032315
This diff is collapsed.
Click to expand it.
public/js/app.js
View file @
3f032315
This diff is collapsed.
Click to expand it.
public/js/app.js.LICENSE.txt
0 → 100644
View file @
3f032315
/*
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.
*/
resources/js/components/NewBook/BookDetail.js
View file @
3f032315
...
...
@@ -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
>
);
}
...
...
resources/js/components/Newbook.js
View file @
3f032315
...
...
@@ -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
:
fals
e
});
this
.
setState
({
book
:
book
,
checkStatus
:
tru
e
});
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> 
;
<
Button
onClick
=
{
this
.
onSubmit
}
type
=
"
primary
"
disabled
=
{
this
.
state
.
disableSubmit
}
>
Submit
<
/Button> 
;
<
Button
onClick
=
{
this
.
onSubmit
}
type
=
"
primary
"
>
Submit
<
/Button> 
;
<
Button
onClick
=
{
this
.
onReset
}
type
=
"
danger
"
>
Refresh
<
/Button
>
<
/Form.Item
>
<
/Form
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment