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

WE-810 FormationMarker view #1793

Merged
merged 7 commits into from
Apr 17, 2023
Merged

WE-810 FormationMarker view #1793

merged 7 commits into from
Apr 17, 2023

Conversation

janburak
Copy link
Contributor

@janburak janburak commented Mar 16, 2023

Fixes

This pull request fixes WE-810

Description

Implement formationMarker API routes and view.

Type of change

  • New feature (non-breaking change which adds functionality)

Impacted Areas in Application

  • Frontend, API, WITSML

Checklist:

Communication

  • PR is related to an issue
  • I have made corresponding changes to the documentation

Code quality

  • Code follows the style guidelines
  • I have self-reviewed my code
  • No new warnings are generated

Test coverage

  • Existing tests pass
  • New code is covered by passing tests

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

@janburak janburak marked this pull request as ready for review March 30, 2023 13:40
@janburak janburak marked this pull request as draft March 31, 2023 08:53
@janburak janburak changed the title WE-810 FromationMarker view WE-810 FormationMarker view Apr 3, 2023
@janburak janburak marked this pull request as ready for review April 3, 2023 05:52

namespace WitsmlExplorer.Api.Models
{
public class Struct
Copy link
Collaborator

Choose a reason for hiding this comment

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

Struct seems like a name which is too generic. Would StratigraphyStruct be a better choice?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good suggestion, implemented.

});
};

const columns: ContentTableColumn[] = [
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would it be more efficient to use the useMemo hook here?

const columns: ContentTableColumn[] = useMemo(
    () => [
      {property: "name", label: "name", type: ContentType.String},
      {property: "itemState", label: "itemState", type: ContentType.String},
      {property: "mdPrognosed", label: "mdPrognosed", type: ContentType.String},
      {property: "tvdPrognosed", label: "tvdPrognosed", type: ContentType.String},
      {property: "mdTopSample", label: "mdTopSample", type: ContentType.String},
      {property: "tvdTopSample", label: "tvdTopSample", type: ContentType.String},
      {property: "thicknessBed", label: "thicknessBed", type: ContentType.String},
      {property: "thicknessApparent", label: "thicknessApparent", type: ContentType.String},
      {property: "thicknessPerpen", label: "thicknessPerpen", type: ContentType.String},
      {property: "mdLogSample", label: "mdLogSample", type: ContentType.String},
      {property: "tvdLogSample", label: "tvdLogSample", type: ContentType.String},
      {property: "dip", label: "dip", type: ContentType.String},
      {property: "dipDirection", label: "dipDirection", type: ContentType.String},
      {property: "lithostratigraphic", label: "lithostratigraphic", type: ContentType.String},
      {property: "chronostratigraphic", label: "chronostratigraphic", type: ContentType.String},
      {property: "description", label: "description", type: ContentType.String}
    ],
    []
  );

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Based on this article, possibly not. Moved columns out of the functional component instead, given that the dependency list would be empty.

@janburak janburak merged commit e62d0f0 into equinor:main Apr 17, 2023
@janburak janburak deleted the WE-810 branch April 17, 2023 07:18
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.

2 participants