-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(admin-ui): provide roles and permissions management screens in A…
…dmin UI #339
- Loading branch information
Showing
12 changed files
with
144 additions
and
64 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
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
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
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
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
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 |
---|---|---|
@@ -1,26 +1,31 @@ | ||
import axios from '../../../../app/redux/api/axios' | ||
export default class LicenseDetailsApi { | ||
constructor(api) { | ||
this.api = api | ||
} | ||
|
||
// Get License Details | ||
export const getLicenseDetails = async () => { | ||
return axios | ||
.get('/license/getLicenseDetails') | ||
.then((response) => response.data) | ||
.catch((error) => { | ||
console.error('Problems getting license details.', error) | ||
return -1 | ||
getLicenseDetails = () => { | ||
return new Promise((resolve, reject) => { | ||
this.api.getAdminuiLicense((error, data) => { | ||
this.handleResponse(error, reject, resolve, data) | ||
}) | ||
}) | ||
} | ||
//update License Details | ||
export const updateLicenseDetails = async (licenseDetails) => { | ||
return axios | ||
.put('/license/updateLicenseDetails', licenseDetails, { | ||
headers: { | ||
'Content-Type': 'application/json', | ||
}, | ||
}) | ||
.then((response) => response) | ||
.catch((error) => { | ||
console.error('Problems updating license details.', error) | ||
return -1 | ||
} | ||
|
||
updateLicenseDetails = (data) => { | ||
const options = {} | ||
options['licenseRequest'] = data | ||
return new Promise((resolve, reject) => { | ||
this.api.editAdminuiLicense(options, (error, options) => { | ||
this.handleResponse(error, reject, resolve, data) | ||
}) | ||
}) | ||
} | ||
} | ||
|
||
handleResponse(error, reject, resolve, data) { | ||
if (error) { | ||
reject(error) | ||
} else { | ||
resolve(data) | ||
} | ||
} | ||
} |
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