Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
24e5931
Update README.md
Cy-Bert Sep 27, 2023
31cc1e9
Merge branch '10-application-front-end' of https://github.com/Alusage…
EvanMlj Nov 6, 2023
5f5e6e0
:lipstick: Ui and theme color and font
EvanMlj Nov 6, 2023
a8ae23e
:lipstick: Sass installation
EvanMlj Nov 7, 2023
1fc4d72
:lipstick: Update contactCard.js
EvanMlj Nov 8, 2023
6ad0071
:construction: Contact Card
EvanMlj Nov 8, 2023
f468394
:heavy_plus_sign: Add sass
EvanMlj Nov 9, 2023
4af5126
:construction: Custom clientCard component
EvanMlj Nov 9, 2023
5a62b7f
:lipstick: Toggle switch
EvanMlj Nov 13, 2023
02ad786
:art: Token css to scss
EvanMlj Nov 13, 2023
228bced
:sparkles: SearchBar
EvanMlj Nov 15, 2023
ae85445
:construction: Search bar
EvanMlj Nov 20, 2023
f7536fd
:construction: SearchBar component
EvanMlj Nov 20, 2023
003133c
:sparkles: Search Bar Page label
EvanMlj Nov 20, 2023
c71d68f
:memo: SearchBar Docs
EvanMlj Nov 20, 2023
a638c9f
:construction: SearchBar fetching datas
EvanMlj Nov 22, 2023
2e0ad02
:construction: Search Bar fetching Contact Name
EvanMlj Nov 22, 2023
274058d
:sparkles: Search Bar V1
EvanMlj Nov 22, 2023
ce17edf
:sparkles: Search Bar IsCompany
EvanMlj Nov 22, 2023
64bbbd8
:sparkles: ContactsList LocalStorage
EvanMlj Nov 27, 2023
f460eaf
:construction: Storage vue wip
EvanMlj Nov 27, 2023
d002454
:adhesive_bandage: Update AuthStore and ContactsStore
EvanMlj Nov 27, 2023
bb57497
:sparkles: Tasks fetch and stored in local storage
EvanMlj Nov 27, 2023
ead68a6
:sparkles: Display datas from local Storage
EvanMlj Nov 29, 2023
c534c7e
:sparkles: Tasks display from local storage
EvanMlj Nov 29, 2023
2c265a2
:sparkles: Logout
EvanMlj Nov 30, 2023
c643da4
:sparkles: :construction: display user id in mainLayout.vue
EvanMlj Dec 4, 2023
607e491
:sparkles: :construction: display of different database via the local…
EvanMlj Dec 4, 2023
7b0cced
Revert ":sparkles: :construction: display of different database via t…
EvanMlj Dec 4, 2023
1ec70f0
:ambulance: Hotfix display servial login infos
EvanMlj Dec 4, 2023
3f2b5a4
:sparkles: :construction: login infos new proprity isChecked
EvanMlj Dec 4, 2023
fd6935a
:sparkles: :construction:
EvanMlj Dec 4, 2023
ca7b339
:construction: Concat of arrays from all loginInfos
EvanMlj Dec 4, 2023
6b278c8
:sparkles: :construction: fetch and display tasks/contacts from all l…
EvanMlj Dec 4, 2023
21527db
:construction: Add a FromDatabase proprity to response json Contacts
EvanMlj Dec 5, 2023
39bdafd
:construction: Add a from database prop to tasks
EvanMlj Dec 5, 2023
d1e48d4
:lipstick: Contact page vue / template
EvanMlj Dec 6, 2023
9ccd88e
:lipstick: :construction: SLider contact list
EvanMlj Dec 7, 2023
e19e67c
fix/DrawerVue
EvanMlj Dec 13, 2023
aaf16d6
style/refactor scss
EvanMlj Dec 13, 2023
0da29e2
:sparkles: Navigation guard / redirection on logout
EvanMlj Dec 15, 2023
17c4c2a
Merge pull request #15 from Alusage/14-multi-serveur-connexion
EvanMlj Dec 18, 2023
c631db9
:ambulance: Hotfix navguard
EvanMlj Dec 18, 2023
4dd6bf8
:ambulance: Navigation guard hotfix
EvanMlj Dec 19, 2023
c3f325b
:children_crossing: Clean Task description
EvanMlj Dec 19, 2023
57c4c6e
:sparkles: Update searchbar read from local storage
EvanMlj Dec 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
/node_modules
.eslintrc.js
/quasar.config.*.temporary.compiled*
/src/stores/store-flag.d.ts
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ A simple odoo mobile app
```bash
npm install
```
## Install Quasar CLI
```bash
npm install -g @quasar/cli
```

### Start the app in development mode (hot-code reloading, error reporting, etc.)
## Start the app in development mode (hot-code reloading, error reporting, etc.)
```bash
npm run dev
quasar dev
```

37 changes: 31 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"private": true,
"scripts": {
"lint": "eslint --ext .js,.vue ./",
"format": "prettier --write \"**/*.{js,vue,css,html,md,json}\" --ignore-path .gitignore",
"format": "prettier --write \"**/*.{js,vue,scss,html,md,json}\" --ignore-path .gitignore",
"test": "echo \"No test specified\" && exit 0",
"dev": "quasar dev",
"build": "quasar build"
Expand Down
Binary file added public/images/odoo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 26 additions & 2 deletions quasar.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module.exports = configure(function (/* ctx */) {
boot: ["pinia"],

// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css
css: ["app.css"],
css: ["app.scss"],

// https://github.com/quasarframework/quasar/tree/dev/extras
extras: [
Expand All @@ -56,6 +56,16 @@ module.exports = configure(function (/* ctx */) {
},

vueRouterMode: "hash", // available values: 'hash', 'history'

viteOption: { // Vite configuration for CSS and Sass
css : {
preprocessorOptions: { // Configure the Sass preprocessor
sass: {
additionalData: `@import 'src/css/app.sass';` // Include custom Sass data, e.g., variables and mixins
}
}
}
}
// vueRouterBase,
// vueDevtools,
// vueOptionsAPI: false,
Expand Down Expand Up @@ -89,7 +99,19 @@ module.exports = configure(function (/* ctx */) {

// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework
framework: {
config: {},
config: {
dark: "false",
brand: {
primary: "#006783",
secondary: "#6d48b4",
accent: "#5d5b7d",
dark: "#191c1e",
positive: "#21BA45",
negative: "#ba1a1a",
info: "#31CCEC",
warning: "#F2C037",
}
},

// iconSet: 'material-icons', // Quasar icon set
// lang: 'en-US', // Quasar language pack
Expand All @@ -105,6 +127,8 @@ module.exports = configure(function (/* ctx */) {
plugins: [
"Notify",
"Dark",
"LocalStorage",
"SessionStorage",
],
},

Expand Down
13 changes: 10 additions & 3 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@
</template>

<script>
import { defineComponent } from 'vue'
import { defineComponent } from 'vue' ;
import { useQuasar } from 'quasar' ;


export default defineComponent({
name: 'App'
})
name: 'App',
setup() {
const $q = useQuasar() ;

$q.dark.set(false);
},
}) ;
</script>
176 changes: 176 additions & 0 deletions src/components/Class/Contacts.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
<!-- <template>
<q-card
v-ripple
@click="getOneClickedContact(contact)"
v-for="contact in Contacts.contactsList" :key="contact.id"
>

<q-card-section class="text">{{ contact.name }}</q-card-section>
<q-card-section class="text">{{ contact.email }}</q-card-section>

</q-card>
</template> -->

<template>
<div>

</div>
</template>

<script>
import { defineComponent } from 'vue';
import axios from 'axios';
// import ContactCard from '../ContactCard.vue';

export default defineComponent({
name: 'ContactsComponent',
data() {
return {
Contacts: {
contactsList: [],
},
};
},
methods: {

cleanContactProperties(contact){
return {
name: contact.name || '',
email: contact.email_normalized || '',
phone: contact.phone || '',
mobile: contact.mobile || '',
image_1920: contact.image_1920 || '',
street: contact.street || '',
street2: contact.street2 || '',
zip: contact.zip || '',
city: contact.city || '',
write_date: contact.write_date || '',
func: contact.function || '',
is_company: contact.is_company || '',
commercial_company_name: contact.commercial_company_name || '',
}
},

async fetchContactList() {
try {
const options = {
method: 'POST',
url: 'https://apps.alusage.fr/jsonrpc',
headers: {
'Content-Type': 'application/json',
},
data: {
jsonrpc: '2.0',
params: {
service: 'object',
method: 'execute_kw',
args: [
'odoo',
'2',
'admin',
'res.partner',
'search_read',
[[]],
{
fields: [
'name',
'email_normalized',
'phone',
'mobile',
'image_1920',
'street',
'street2',
'zip',
'city',
'write_date',
'function',
'is_company',
],
},
],
},
},
};

const response = await axios.request(options);
const contactData = response.data.result;

let listeClean = [] ;


contactData.forEach( (contact) => {
listeClean.push(this.cleanContactProperties(contact)) ;

});

// console.log(contactData);

this.Contacts.contactsList = listeClean;
// console.log(this.Contacts.contactsList);
// Emit the contacts list to the parent component
this.$emit('fetchedContactList', this.Contacts.contactsList);

} catch (error) {
console.error(error);
}
},


getOneClickedContact(contact){
this.$emit('clickedContact', contact);
},

},
mounted() {
this.fetchContactList();

// this.getOneContact();
// this.assignContactsData();
// this.getContactProperties();
// this.testClick();
},
});
</script>

<!-- ['name', 'email_normalized', 'phone', 'mobile', 'image_1920', 'street', 'street2', 'zip', 'city', 'write_date', 'function', 'is_company', 'commercial_company_name'] -->

<!-- const fetchContactList = async () => {
try {
const options = {
method: 'POST',
url: 'https://apps.alusage.fr/jsonrpc',
headers: {
'Content-Type': 'application/json',
},
data: {
jsonrpc: '2.0',
params: {
service: 'object',
method: 'execute_kw',
args: [
state.db,
state.myId,
state.apikey,
'res.partner',
'search_read',
[[]],
{
fields: ['name', 'email_normalized', 'phone', 'mobile', 'image_1920', 'street', 'street2', 'zip', 'city','write_date','function', 'is_company'],
}
]
}
}
};


const response = await axios.request(options);
state.rows = response.data.result;
isContactListFetched.value = true;

console.log(state.rows)
console.log(state.rows[10].name)
} catch (error) {
console.error(error);
}

} -->
Loading