Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add revert changes button #818

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

PrographerMan
Copy link
Contributor

No description provided.

@PrographerMan PrographerMan force-pushed the feature-231670-add-revert-changes-button branch 4 times, most recently from 8875ead to ae0b517 Compare April 5, 2023 09:09
@@ -149,6 +149,12 @@ export default FdBaseSheet.extend(
iconClasses: ' icon-fd-uml-edit icon',
buttonAction: this.get('umlСorrector').bind(this)
},
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

я все еще думаю что стоит кнопку перенести в тоол бар

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Исправил

const revert = () => {
this.openSheet(this.get('sheetComponentName'), this.get('selectedValue'));
}
const currentStageRecords = new A([
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

мб использовать метод из сервиса который проверяет диаграммы при открытии? https://github.com/Flexberry/ember-flexberry-designer/blob/develop/addon/services/fd-sheet-service.js#L236 и тогда поидее эта логика будет для всех листов работать

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Исправил

@PrographerMan PrographerMan force-pushed the feature-231670-add-revert-changes-button branch 4 times, most recently from a0779e7 to 339312d Compare April 6, 2023 10:48
@@ -201,6 +201,10 @@ export default Component.extend(FdReadonlyProjectMixin, FdShareFunctionMixin, {
},

actions: {
revertChanges() {
this.openSheet(this.get('sheetComponentName'), this.get('targetObject.selectedValue.data'))
Copy link
Contributor

@pepelyaeva pepelyaeva Apr 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А где модальное окно для подтверждения? где вызов метода findUnsavedSheetData для проверки? и ошибки валятся
image

@PrographerMan PrographerMan force-pushed the feature-231670-add-revert-changes-button branch 2 times, most recently from 66ac521 to 493fe61 Compare April 10, 2023 07:31
@@ -251,6 +251,10 @@ export default FdBaseSheet.extend(
this.set('selectedValue', undefined);
},

revertChanges() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

удалить

@@ -135,6 +135,21 @@ export default FdBaseSheet.extend({
this.set('selectedValue', undefined);
},

revertChanges() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

удалить

@@ -4,10 +4,16 @@
</div>
<div class="fd-sheet-header">
{{fd-sheets/fd-sheets-tool-bar
revertChanges=revertChanges
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это все что? зачем? убрать мусор

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Готово

@@ -4,10 +4,15 @@
</div>
<div class="fd-sheet-header {{unless isAddMode "fd-sheet-diagram-header"}} {{if _collapseToolbar "fd-toolbar-hidden"}}">
{{fd-sheets/fd-sheets-tool-bar
isDiagramVisible=isDiagramVisible
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

убрать это все

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Готово

Copy link
Contributor Author

@PrographerMan PrographerMan Apr 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

На форме диаграммы и модели приложения отличается реализация метода deactivateListItem, поэтому я передаю его параметром в тулбар

revertChanges() {
const unsavedData = this.get('fdSheetService').findUnsavedSheetData(this.get('sheetComponentName'));
const revert = () => {
this.openSheet(this.get('sheetComponentName'), this.get('selectedValue'))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

contentSheetValue есть свойство надо использовать его!
selectedValue тут нет!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не this.openSheet наверное а сервисом надо дергать?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Готово

@PrographerMan PrographerMan force-pushed the feature-231670-add-revert-changes-button branch 2 times, most recently from 4d9b81e to 10899a6 Compare April 12, 2023 06:12
@PrographerMan PrographerMan force-pushed the feature-231670-add-revert-changes-button branch from 10899a6 to bb31e77 Compare April 12, 2023 07:41
@sonarcloud
Copy link

sonarcloud bot commented Apr 12, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants