INNER CODE UNIT · JavaScript

ProjectBasedFkField

vstconsulting/polemarch · frontend_src/history/index.js:21

export class ProjectBasedFkField extends spa.fields.fk.fk.FKField {
    _formatQuerysetPath(queryset) {
        return super._formatQuerysetPath(queryset).clone({
            url: queryset.url
                .replace('{id}', this.props.project)
                .replace('{execution_templates_id}', this.props.template)
                .replace('{options_id}', this.props.template_option),
        });
    }
}
ProjectBasedFkField.format = 'project-fk';
spa.signals.once('APP_CREATED', (app) => {
    app.fieldsResolver.registerField('integer', ProjectBasedFkField.format, ProjectBasedFkField);
});

export const modePlaybookField = ({ project }) => ({
    name: 'mode',
    format: ProjectBasedFkField.format,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…