Rename route from data to documents

This commit is contained in:
Stanislav Romanov 2022-08-30 14:10:49 +03:00
parent 0c4f4e690e
commit 38d86a3785
10 changed files with 30 additions and 29 deletions

View file

@ -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;

View file

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

View file

@ -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,

View file

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

View file

@ -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}} /> --}}

View file

@ -1,4 +1,3 @@
{{page-title 'Data'}}
<InputText
@placeholder='Search'
@prefixIcon={{this.Magnify}}

View file

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

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

View file

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

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