Rename route from data to documents
This commit is contained in:
parent
0c4f4e690e
commit
38d86a3785
10 changed files with 30 additions and 29 deletions
|
|
@ -3,7 +3,7 @@ import { action } from '@ember/object';
|
|||
import { tracked } from '@glimmer/tracking';
|
||||
import { Magnify, Table, MapOutline } from 'ember-mdi';
|
||||
|
||||
export default class AdminIndexesItemDataController extends Controller {
|
||||
export default class AdminIndexesItemDocumentsController extends Controller {
|
||||
@tracked q = null;
|
||||
@tracked limit = 20;
|
||||
@tracked page = 1;
|
||||
|
|
@ -11,9 +11,9 @@ Router.map(function () {
|
|||
this.route('indexes', function () {
|
||||
this.route('item', { path: '/:uid' }, function () {
|
||||
this.route('settings');
|
||||
this.route('data');
|
||||
this.route('info');
|
||||
this.route('edit');
|
||||
this.route('documents');
|
||||
});
|
||||
this.route('new');
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import Route from '@ember/routing/route';
|
||||
import { hash } from 'rsvp';
|
||||
|
||||
export default class AdminIndexesItemDataRoute extends Route {
|
||||
export default class AdminIndexesItemDocumentsRoute extends Route {
|
||||
queryParams = {
|
||||
q: {
|
||||
refreshModel: true,
|
||||
|
|
@ -5,6 +5,6 @@ export default class AdminIndexesItemIndexRoute extends Route {
|
|||
@service router;
|
||||
|
||||
beforeModel() {
|
||||
this.router.transitionTo('admin.indexes.item.data');
|
||||
this.router.transitionTo('admin.indexes.item.documents');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<h1 class="text-2xl mb-4">{{capitalize @model.uid}}</h1>
|
||||
|
||||
<div class="flex mb-4">
|
||||
<Tab @route="admin.indexes.item.data" @text="Data" @model={{@model}} />
|
||||
<Tab @route="admin.indexes.item.documents" @text="Documents" @model={{@model}} />
|
||||
<Tab @route="admin.indexes.item.info" @text="Info" @model={{@model}} />
|
||||
<Tab @route="admin.indexes.item.edit" @text="Edit" @model={{@model}} />
|
||||
{{!-- <Tab @route="admin.indexes.item.settings" @text="Settings" @model={{@model}} /> --}}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
{{page-title 'Data'}}
|
||||
<InputText
|
||||
@placeholder='Search'
|
||||
@prefixIcon={{this.Magnify}}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module('Unit | Controller | admin/indexes/item/data', function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
// TODO: Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let controller = this.owner.lookup('controller:admin/indexes/item/data');
|
||||
assert.ok(controller);
|
||||
});
|
||||
});
|
||||
14
tests/unit/controllers/admin/indexes/item/documents-test.js
Normal file
14
tests/unit/controllers/admin/indexes/item/documents-test.js
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'meiliadmin/tests/helpers';
|
||||
|
||||
module('Unit | Controller | admin/indexes/item/documents', function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
// TODO: Replace this with your real tests.
|
||||
test('it exists', function (assert) {
|
||||
let controller = this.owner.lookup(
|
||||
'controller:admin/indexes/item/documents'
|
||||
);
|
||||
assert.ok(controller);
|
||||
});
|
||||
});
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module('Unit | Route | admin/indexes/item/data', function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
test('it exists', function (assert) {
|
||||
let route = this.owner.lookup('route:admin/indexes/item/data');
|
||||
assert.ok(route);
|
||||
});
|
||||
});
|
||||
11
tests/unit/routes/admin/indexes/item/documents-test.js
Normal file
11
tests/unit/routes/admin/indexes/item/documents-test.js
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'meiliadmin/tests/helpers';
|
||||
|
||||
module('Unit | Route | admin/indexes/item/documents', function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
test('it exists', function (assert) {
|
||||
let route = this.owner.lookup('route:admin/indexes/item/documents');
|
||||
assert.ok(route);
|
||||
});
|
||||
});
|
||||
Loading…
Reference in a new issue