-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
13 changed files
with
171 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ['@react-native', 'prettier'], | ||
ignorePatterns: ['lib/'], | ||
rules: { | ||
'prettier/prettier': 'off', | ||
}, | ||
}; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lib/ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const projectConfig = require('../../../.prettierrc'); | ||
|
||
module.exports = { | ||
...projectConfig, | ||
}; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
title: Purchase | ||
tags: Readme | ||
--- | ||
|
||
<h1 align="center">@axelor/aos-mobile-purchase</h1> | ||
|
||
<div align="center"> | ||
<img src="https://i.imgur.com/KJAAFlT.png" width="30%"/> | ||
</div> | ||
|
||
## Presentation | ||
|
||
This package was developed for the [Axelor Open Mobile](https://github.com/axelor/axelor-mobile) application. | ||
|
||
The purpose of this package is to link with the purchase module of the [Axelor Open Suite (AOS)](https://github.com/axelor/axelor-open-suite) ERP. It provides a simplified version of a number of processes available on the webapp. This package is compatible with AOS from version 8.3.0. | ||
|
||
## Usage | ||
|
||
Install the library : | ||
|
||
```bash | ||
yarn add @axelor/aos-mobile-purchase | ||
``` | ||
|
||
Compatibility with React v18.2.x and React Native v0.73.x. | ||
|
||
To add this package in your application, you need to add it in the _modules_ props of the component `Application` from @axelor/aos-mobile-core package. | ||
|
||
```typescript | ||
import React from 'react'; | ||
import {Application} from '@axelor/aos-mobile-core'; | ||
import {PurchaseModule} from '@axelor/aos-mobile-purchase'; | ||
|
||
const App = () => { | ||
return <Application modules={[PurchaseModule]} mainMenu="auth_menu_user" />; | ||
}; | ||
|
||
export default App; | ||
``` | ||
|
||
## Developpment | ||
|
||
This package is developed as part of the Axelor Open Mobile application. To contribute, please go to the [Github project](https://github.com/axelor/axelor-mobile) and follow the guidelines. You will also find an installation guide to help you configure your environment. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
presets: ['module:@react-native/babel-preset'], | ||
}; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"name": "@axelor/aos-mobile-purchase", | ||
"version": "8.3.0", | ||
"author": "Axelor", | ||
"license": "AGPL-3.0-only", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.js", | ||
"files": ["lib"], | ||
"scripts": { | ||
"clean": "rm -rf lib/", | ||
"compile": "tsc -p tsconfig.build.json", | ||
"dev": "npm run compile -- --watch", | ||
"build": "npm run clean && npm run compile", | ||
"npm-publish": "npm publish", | ||
"lint": "eslint .", | ||
"format": "prettier --write src/", | ||
"format:check": "prettier --check src/", | ||
"license:add": "npx add-copyright-header --generate --dir 'src'" | ||
}, | ||
"peerDependencies": { | ||
"react": "18.2.0", | ||
"react-native": "0.73.9" | ||
}, | ||
"dependencies": { | ||
"@axelor/aos-mobile-core": "8.3.0", | ||
"@axelor/aos-mobile-ui": "8.3.0", | ||
"@reduxjs/toolkit": "^2.2.7" | ||
}, | ||
"devDependencies": { | ||
"@babel/runtime": "^7.20.0", | ||
"@react-native/babel-preset": "0.73.21", | ||
"@react-native/eslint-config": "0.73.2", | ||
"@types/react": "^18.2.6", | ||
"eslint": "8.57.0", | ||
"prettier": "^3.3.3", | ||
"react": "18.2.0", | ||
"react-native": "0.73.9" | ||
}, | ||
"resolutions": { | ||
"@types/react": "^18.2.6" | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"Purchase_Purchase": "Purchase" | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"Purchase_Purchase": "Achats" | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Axelor Business Solutions | ||
* | ||
* Copyright (C) 2024 Axelor (<http://axelor.com>). | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License, version 3, | ||
* as published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
import {Module} from '@axelor/aos-mobile-core'; | ||
import enTranslations from './i18n/en.json'; | ||
import frTranslations from './i18n/fr.json'; | ||
|
||
export const PurchaseModule: Module = { | ||
name: 'app-purchase', | ||
title: 'Purchase_Purchase', | ||
subtitle: 'Purchase_Purchase', | ||
icon: 'cart-fill', | ||
compatibilityAOS: { | ||
moduleName: 'axelor-purchase', | ||
downToVersion: '8.3.0', | ||
}, | ||
translations: { | ||
en: enTranslations, | ||
fr: frTranslations, | ||
}, | ||
}; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"extends": "../../../tsconfig.build.json", | ||
"compilerOptions": { | ||
"resolveJsonModule": true, | ||
"esModuleInterop": true, | ||
"outDir": "lib", | ||
"paths": { | ||
"@/*": ["./src/*"] | ||
} | ||
}, | ||
"include": ["src"] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": "../../../tsconfig.json", | ||
"compilerOptions": { | ||
"paths": { | ||
"@/*": ["./src/*"] | ||
} | ||
} | ||
} |
This file contains 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