Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
ReactNativeBase
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
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
Nguyen Danh Khanh
ReactNativeBase
Commits
da2c496c
Commit
da2c496c
authored
Jul 06, 2021
by
Nguyen Danh Khanh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix done UI
parent
c3342b58
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
75 additions
and
68 deletions
+75
-68
src/assets/icon/iconHeader/icon-back.png
src/assets/icon/iconHeader/icon-back.png
+0
-0
src/components/Header/index.tsx
src/components/Header/index.tsx
+1
-1
src/components/IconBack/index.style.ts
src/components/IconBack/index.style.ts
+16
-0
src/components/IconBack/index.tsx
src/components/IconBack/index.tsx
+20
-0
src/screens/Home/index.tsx
src/screens/Home/index.tsx
+0
-35
src/screens/HomeBill/index.tsx
src/screens/HomeBill/index.tsx
+6
-1
src/screens/HomeCreateBill/index.style.ts
src/screens/HomeCreateBill/index.style.ts
+5
-3
src/screens/HomeCreateBill/index.tsx
src/screens/HomeCreateBill/index.tsx
+9
-23
src/screens/HomeProductCreate/index.style.ts
src/screens/HomeProductCreate/index.style.ts
+2
-2
src/screens/HomeProductCreate/index.tsx
src/screens/HomeProductCreate/index.tsx
+4
-1
src/screens/HomeRepository/index.tsx
src/screens/HomeRepository/index.tsx
+5
-1
src/screens/InvoiceList/index.tsx
src/screens/InvoiceList/index.tsx
+7
-1
No files found.
src/assets/icon/iconHeader/icon-back.png
0 → 100644
View file @
da2c496c
214 Bytes
src/components/Header/index.tsx
View file @
da2c496c
...
...
@@ -5,7 +5,7 @@
*/
import
React
,
{
ReactElement
}
from
'
react
'
;
import
{
View
}
from
'
react-native
'
;
import
{
View
,
TouchableOpacity
}
from
'
react-native
'
;
import
styles
from
'
./index.style
'
...
...
src/components/IconBack/index.style.ts
0 → 100644
View file @
da2c496c
import
{
StyleSheet
}
from
"
react-native
"
;
const
styles
=
StyleSheet
.
create
({
containerIconBack
:
{
backgroundColor
:
"
#61A02C
"
,
alignItems
:
'
center
'
,
justifyContent
:
'
center
'
},
iconBack
:
{
height
:
20
,
width
:
12
,
},
});
export
default
styles
;
\ No newline at end of file
src/components/IconBack/index.tsx
0 → 100644
View file @
da2c496c
import
React
,
{
ReactElement
}
from
'
react
'
;
import
{
View
,
Image
}
from
'
react-native
'
;
import
styles
from
'
./index.style
'
type
Props
=
{
}
const
IconMedlink
=
(
props
:
Props
)
=>
{
return
(
<
View
style=
{
styles
.
containerIconBack
}
>
<
Image
style=
{
styles
.
iconBack
}
source=
{
require
(
'
../../assets/icon/iconHeader/icon-back.png
'
)
}
/>
</
View
>
);
};
export
default
IconMedlink
;
\ No newline at end of file
src/screens/Home/index.tsx
View file @
da2c496c
...
...
@@ -25,42 +25,7 @@ const App = () => {
const
navigation
=
useNavigation
();
//------------------------------------------------------
// const [todayRevenue, setTodayRevenue] = useState(0) // doanh thu hom nay
// const [thisMonthRevenue, setThisMonthRevenue] = useState(0) // doanh thu thang nay
// const [lastMonthRevenue, setLastMonthRevenue] = useState(0) // doanh thu thang truoc
// const [todayInvoice, setTodayInvoice] = useState(0)
// const [todayExport, setTodayExport] = useState(0) // hoa don hom nay
// const [totalImport, setTodayImport] = useState(0) // nhap kho hom nay
// const [etd, setEtd] = useState(0) // da het han
// const [ate, setAte] = useState(0) // sap het han
// const [osp, setOsp] = useState(0) // sap het trong kho
// type totalDashboard = {
// today_total_revenue: any| undefined
// this_month_revenue: any | undefined
// last_month_revenue: number
// today_total_invoice: number
// today_total_import: number
// today_total_export: number
// expire_time_products: number
// total_drug_about_to_expire: number
// out_of_stock_product: number
// }
// const totalDashboard = dashboardRequest()
// const a = totalDashboard.today_total_revenue
// setTodayRevenue(totalDashboard.today_total_revenue)
// setThisMonthRevenue(totalDashboard.this_month_revenue)
// setLastMonthRevenue(totalDashboard.last_month_revenue)
// setTodayInvoice(totalDashboard.today_total_invoice)
// setTodayImport(totalDashboard.today_total_import)
// setTodayExport(totalDashboard.today_total_export)
// setEtd(totalDashboard.expire_time_products)
// setAte(totalDashboard.total_drug_about_to_expire)
// setOsp(totalDashboard.out_of_stock_product)
// const revenueAll = dashboardRequest()
// console.log(revenueAll)
// dashboardRequest()
//------------------------------------------------------------------------------------
const
token
=
useSelector
((
state
:
RootState
)
=>
state
.
auth
.
token
)
...
...
src/screens/HomeBill/index.tsx
View file @
da2c496c
...
...
@@ -11,11 +11,16 @@ import styles from './index.style';
import
Header
from
'
../../components/Header
'
;
import
IconMedlink
from
'
../../components/IconMedlink
'
;
import
HeaderTitle
from
'
../../components/HeaderTitle
'
;
import
IconBack
from
'
../../components/IconBack
'
;
import
{
useNavigation
}
from
'
@react-navigation/core
'
;
const
App
=
()
=>
{
const
navigation
=
useNavigation
()
const
_renderHeaderLeft
=
()
=>
{
return
(
<
IconMedlink
/>
<
TouchableOpacity
onPress=
{
()
=>
navigation
.
goBack
()
}
>
<
IconBack
/>
</
TouchableOpacity
>
)
}
const
_renderHeaderCenter
=
()
=>
{
...
...
src/screens/HomeCreateBill/index.style.ts
View file @
da2c496c
...
...
@@ -8,8 +8,7 @@ const styles = StyleSheet.create({
height
:
40
,
},
container
:
{
paddingBottom
:
50
,
marginBottom
:
50
,
marginBottom
:
60
,
},
buttonAdd
:
{
height
:
150
,
...
...
@@ -97,9 +96,12 @@ const styles = StyleSheet.create({
noteTitleContainer
:
{
flexDirection
:
'
row
'
,
alignItems
:
'
center
'
},
buttonSend
:
{
paddingBottom
:
100
,
height
:
200
,
}
});
export
default
styles
;
\ No newline at end of file
src/screens/HomeCreateBill/index.tsx
View file @
da2c496c
...
...
@@ -21,12 +21,16 @@ import config from "../../configs"
import
ItemCartProduct
from
'
../../components/ItemCartProduct
'
;
import
{
RootState
}
from
'
../../redux/reducers
'
;
import
{
Product
}
from
'
../../model/cart
'
;
import
IconBack
from
'
../../components/IconBack
'
;
const
App
=
()
=>
{
const
navigation
=
useNavigation
()
const
_renderHeaderLeft
=
()
=>
{
return
(
<
IconMedlink
/>
<
TouchableOpacity
onPress=
{
()
=>
navigation
.
goBack
()
}
>
<
IconBack
/>
</
TouchableOpacity
>
)
}
const
_renderHeaderCenter
=
()
=>
{
...
...
@@ -168,25 +172,7 @@ const App = () => {
'
current_pay
'
:
40000
,
'
note
'
:
note
,
}
// const newProduct = {
// base_quantity: 1,
// discount: 0,
// discount_type: "VNĐ",
// discount_unit: 0,
// dosage: products.dosage,
// drg_drug_cd: cartProducts.drg_drug_cd,
// drg_drug_name: cartProducts.drg_drug_name,
// drug_id: cartProducts.drug_id,
// drug_unit_id: cartProducts.drug_unit_id,
// import_price: 0,
// inv_id: cartProducts.inv_id,
// lot: cartProducts.lot,
// price: cartProducts.price,
// promotion_flg: 0,
// quantity: 2,
// unit_id: 14,
// unit_name: "Viên"
// }
console
.
log
(
'
function
'
,
cartProducts
)
const
body
=
{
'
invoice
'
:
invoice
,
...
...
@@ -201,9 +187,6 @@ const App = () => {
const
baseURL
=
config
.
axiosConfig
().
baseURL
try
{
const
response
=
await
axios
.
post
(
`
${
baseURL
}
/invoice`
,
body
,
header
)
// const totalDashboard = response.data
// console.log('Data: ', response.data)
// console.log('total: ', response.data.today_total_revenue)
console
.
log
(
response
)
return
response
}
catch
(
error
)
{
...
...
@@ -265,6 +248,9 @@ const App = () => {
{
_renderNote
()
}
<
Button
onPress=
{
()
=>
submit
()
}
title=
'SEND'
></
Button
>
</
ScrollView
>
<
TouchableOpacity
style=
{
styles
.
buttonSend
}
onPress=
{
()
=>
submit
()
}
>
<
Text
>
SENDDDDDDDDDDDDDDDDDD
</
Text
>
</
TouchableOpacity
>
</
SafeAreaView
>
);
};
...
...
src/screens/HomeProductCreate/index.style.ts
View file @
da2c496c
...
...
@@ -5,8 +5,8 @@ const styles = StyleSheet.create({
rightHeader
:
{
fontWeight
:
'
bold
'
,
fontSize
:
1
5
,
color
:
'
white
'
fontSize
:
1
4
,
color
:
'
white
'
,
},
container
:
{
alignItems
:
'
center
'
,
...
...
src/screens/HomeProductCreate/index.tsx
View file @
da2c496c
...
...
@@ -20,6 +20,7 @@ import { addProductToCart } from '../../redux/actions/cart';
import
{
Cart
,
Product
}
from
"
../../model/cart
"
;
import
{
Data
}
from
'
../../model/product
'
;
import
{
RootState
}
from
'
../../redux/reducers
'
;
import
IconBack
from
'
../../components/IconBack
'
;
const
App
=
()
=>
{
...
...
@@ -29,7 +30,9 @@ const App = () => {
//-------------------------------------------------------------------
const
_renderHeaderLeft
=
()
=>
{
return
(
<
IconMedlink
/>
<
TouchableOpacity
onPress=
{
()
=>
navigation
.
goBack
()
}
>
<
IconBack
/>
</
TouchableOpacity
>
)
}
const
_renderHeaderCenter
=
()
=>
{
...
...
src/screens/HomeRepository/index.tsx
View file @
da2c496c
...
...
@@ -11,11 +11,15 @@ import IconMedlink from '../../components/IconMedlink';
import
HeaderTitle
from
'
../../components/HeaderTitle
'
;
import
HomeRepositoryItem
from
'
../../components/HomeRepositoryItem
'
import
{
useNavigation
}
from
'
@react-navigation/core
'
;
import
IconBack
from
'
../../components/IconBack
'
;
const
App
=
()
=>
{
const
navigation
=
useNavigation
()
const
_renderHeaderLeft
=
()
=>
{
return
(
<
IconMedlink
/>
<
TouchableOpacity
onPress=
{
()
=>
navigation
.
goBack
()
}
>
<
IconBack
/>
</
TouchableOpacity
>
)
}
const
_renderHeaderCenter
=
()
=>
{
...
...
src/screens/InvoiceList/index.tsx
View file @
da2c496c
...
...
@@ -11,11 +11,17 @@ import styles from './index.style';
import
Header
from
'
../../components/Header
'
;
import
IconMedlink
from
'
../../components/IconMedlink
'
;
import
HeaderTitle
from
'
../../components/HeaderTitle
'
;
import
IconBack
from
'
../../components/IconBack
'
;
import
{
useNavigation
}
from
'
@react-navigation/core
'
;
const
App
=
()
=>
{
const
navigation
=
useNavigation
()
const
_renderHeaderLeft
=
()
=>
{
return
(
<
IconMedlink
/>
<
TouchableOpacity
onPress=
{
()
=>
navigation
.
goBack
()
}
>
<
IconBack
/>
</
TouchableOpacity
>
)
}
const
_renderHeaderCenter
=
()
=>
{
...
...
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