Manual Reference Source Test
public class | source

AllowedAction

Mixin Extends:

AllowedActionModel, Helper

Helper class representing a Permission AllowedAction.

Test:

Static Member Summary

Static Public Members
public static get

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public get
public set

Method Summary

Public Methods
public

async delete(): Promise

Deletes an allowedAction

public

Saves an allowed action (insert if id doesn't exist, update if it does)

Inherited Summary

From class AllowedActionModel
public
public

Static Public Members

public static get type: String source

Public Constructors

public constructor() source

Override:

AllowedActionModel#constructor

Public Members

public get permission: Permission source

public set permission: Permission source

Public Methods

public async delete(): Promise source

Deletes an allowedAction

Return:

Promise

Returns a promise via ajax call.

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 });

Test:

public async save(): Promise<AllowedAction> source

Saves an allowed action (insert if id doesn't exist, update if it does)

Return:

Promise<AllowedAction>

Returns a promise via ajax call.

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());

Test: