AllowedAction
Mixin Extends:
Helper class representing a Permission AllowedAction.
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public get |
|
|
public set |
|
Method Summary
Public Methods | ||
public |
Deletes an allowedAction |
|
public |
async save(): Promise<AllowedAction> Saves an allowed action (insert if id doesn't exist, update if it does) |
Inherited Summary
From class AllowedActionModel | ||
public |
|
|
public |
|
Public Constructors
Public Methods
public async delete(): Promise source
Deletes an allowedAction
Example:
import { AllowedAction, Client } from 'clinical6';
// Removes allowedAction from server and local storage
const allowedAction = new AllowedAction({...});
allowedAction.delete();
// No longer in storage
Client.instance.storageUtility.has('allowedActions', { id: 1 });
public async save(): Promise<AllowedAction> source
Saves an allowed action (insert if id doesn't exist, update if it does)
Example:
import { AllowedAction, clinical6 } from 'clinical6';
// Insert is different from other inserts.
const allowedAction = new AllowedAction({
"name": "manage"
});
allowedAction.save();
// Updates existing allowedAction (has existing id)
clinical6.get(AllowedAction).then(allowedActions => allowedActions[0].save());